josevalim commited on
Commit
3727c60
1 Parent(s): 6df0ed8
Files changed (3) hide show
  1. Dockerfile +2 -1
  2. public-apps/.gitkeep +0 -0
  3. public-apps/welcome.livemd +46 -0
Dockerfile CHANGED
@@ -4,11 +4,12 @@ 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_DATA_PATH "/data"
8
  ENV LIVEBOOK_PORT 7860
9
 
10
  EXPOSE 7860
11
-
12
  USER root
 
13
  RUN mkdir -p /data
14
  RUN chmod 777 /data
 
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_DATA_PATH "/data"
9
  ENV LIVEBOOK_PORT 7860
10
 
11
  EXPOSE 7860
 
12
  USER root
13
+ COPY public-apps/ /public-apps
14
  RUN mkdir -p /data
15
  RUN chmod 777 /data
public-apps/.gitkeep ADDED
File without changes
public-apps/welcome.livemd ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!-- livebook:{"app_settings":{"access_type":"public","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
+ ```