Zlatislav Zlatev aleDsz commited on
Commit
e1b7ed9
β€’
0 Parent(s):

Duplicate from livebook-dev/livebook

Browse files

Co-authored-by: Alexandre de Souza <aleDsz@users.noreply.huggingface.co>

Files changed (5) hide show
  1. .gitattributes +34 -0
  2. Dockerfile +24 -0
  3. README.md +10 -0
  4. public-apps/.gitkeep +0 -0
  5. public-apps/welcome.livemd +46 -0
.gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ghcr.io/livebook-dev/livebook:latest-cuda11.8
2
+
3
+ ENV LIVEBOOK_APP_SERVICE_NAME "🐳 Hugging Face - $SPACE_TITLE"
4
+ ENV LIVEBOOK_APP_SERVICE_URL "https://huggingface.co/spaces/$SPACE_AUTHOR_NAME/$SPACE_REPO_NAME"
5
+ ENV LIVEBOOK_UPDATE_INSTRUCTIONS_URL "https://livebook.dev"
6
+ ENV LIVEBOOK_WITHIN_IFRAME "true"
7
+ ENV LIVEBOOK_APPS_PATH "/public-apps"
8
+ ENV LIVEBOOK_APPS_PATH_WARMUP "manual"
9
+ ENV LIVEBOOK_DATA_PATH "/data"
10
+ ENV LIVEBOOK_PORT 7860
11
+
12
+ EXPOSE 7860
13
+
14
+ RUN mkdir -p /data
15
+ RUN chmod 777 /data
16
+
17
+ # The Space container runs with user ID 1000
18
+ RUN useradd -m -u 1000 user
19
+ ENV HOME=/home/user
20
+
21
+ USER user
22
+
23
+ COPY --chown=user public-apps/ /public-apps
24
+ RUN /app/bin/warmup_apps
README.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: Livebook
3
+ emoji: πŸ““
4
+ colorFrom: pink
5
+ colorTo: purple
6
+ sdk: docker
7
+ fullWidth: true
8
+ ---
9
+
10
+ You can install and run [Livebook](https://livebook.dev/) inside a Hugging Face Space. Here's [a tutorial](https://huggingface.co/docs/hub/spaces-sdks-docker-livebook) on how to do that.
public-apps/.gitkeep ADDED
File without changes
public-apps/welcome.livemd ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- livebook:{"app_settings":{"access_type":"public","output_type":"rich","slug":"welcome"}} -->
2
+
3
+ # Livebook <3 Hugging Face
4
+
5
+ ```elixir
6
+ Mix.install([
7
+ {:kino, "~> 0.9"}
8
+ ])
9
+ ```
10
+
11
+ ## Section
12
+
13
+ This is the source of a deployed notebook.
14
+ This notebook is static and simply renders the markdown content below.
15
+
16
+ ```elixir
17
+ Kino.Markdown.new("""
18
+ Welcome to Livebook in Hugging Face!
19
+
20
+ This is a deployed notebook, which is also a perfect place to teach you
21
+ the ropes in using Livebook with Hugging Face.
22
+
23
+ ## Getting started
24
+
25
+ First off, if you want to run your own copy of Livebook,
26
+ [check our tutorial](https://news.livebook.dev/livebook-inside-hugging-face-spaces-3LQaRi).
27
+ Once you clone the space, remember to set `LIVEBOOK_PASSWORD` as
28
+ an environment variable on your Space Settings page (a minimum of
29
+ 12 digits is required).
30
+
31
+ If you are new to Elixir and Livebook, [head out to the Learn page](/learn)
32
+ (it requires a password), there you will find resources to get started
33
+ with both.
34
+
35
+ ## Deploying notebooks
36
+
37
+ Livebook is fully collaborative and it enables you to deploy interactive
38
+ and collaborative apps just as well. All of your deployable notebooks will
39
+ be in the "public-apps" directory of your Spaces repository.
40
+
41
+ To deploy your own notebook on Hugging Face, you must click the
42
+ <i class="ri-livebook-deploy"></i> icon on the notebook sidebar, set a "Slug"
43
+ for the notebook, mark it as public and then drop its `.livemd` file into
44
+ the "public-apps" directory of your Spaces repo.
45
+ """)
46
+ ```