StefanoDUrso commited on
Commit
4566e8e
·
1 Parent(s): 1b5a867

update readme.md

Browse files
Files changed (1) hide show
  1. README.md +10 -15
README.md CHANGED
@@ -9,16 +9,7 @@ pinned: false
9
 
10
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
11
 
12
- STEPS:
13
-
14
- Start by cloning this repo by using:
15
-
16
- git clone https://huggingface.co/spaces/MY_HUGGINGFACE_NAME/Chainlit-docker
17
- Create your Dockerfile file:
18
-
19
- # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
20
-
21
- # you will also find guides on how best to write your Dockerfile
22
 
23
  FROM python:3.9
24
 
@@ -30,15 +21,17 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
30
 
31
  COPY . .
32
 
33
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
34
  Then commit and push:
35
 
36
- git add Dockerfile
37
- git commit -m "Add application file"
38
  git push
39
 
40
  **\*\*** ATTENTION **\*\***
41
- Since October 2023 it is not possible to push using simply username and password: we need to generate a token at HuggingFace and perform the push accordingly: https://huggingface.co/blog/password-git-deprecation
42
 
43
  If you don’t have any SSH keys on your machine, you can use ssh-keygen to generate a new SSH key pair (public + private keys):
44
  ssh-keygen -t ed25519 -C "[email protected]"
@@ -93,7 +86,9 @@ repository -> settings -> secrets and variables -> actions -> new repo secret
93
 
94
  create the HF_TOKEN with the value of the token configured in HuggingFace
95
 
96
- In your repository, create the .github/workflows/ directory to store your workflow files.
 
 
97
 
98
  in order to push on Github repo we need to type:
99
  git push github_repo
 
9
 
10
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
11
 
12
+ Create a Dockerfile as follows:
 
 
 
 
 
 
 
 
 
13
 
14
  FROM python:3.9
15
 
 
21
 
22
  COPY . .
23
 
24
+ CMD ["chainlit", "run", "app.py", "--port", "7860"]
25
+
26
+
27
  Then commit and push:
28
 
29
+ git add .
30
+ git commit -m "first commit"
31
  git push
32
 
33
  **\*\*** ATTENTION **\*\***
34
+ The PUSH as it is will FAILS: since October 2023 it is not possible to push using simply username and password: we need to generate a token at HuggingFace and perform the push accordingly: https://huggingface.co/blog/password-git-deprecation
35
 
36
  If you don’t have any SSH keys on your machine, you can use ssh-keygen to generate a new SSH key pair (public + private keys):
37
  ssh-keygen -t ed25519 -C "[email protected]"
 
86
 
87
  create the HF_TOKEN with the value of the token configured in HuggingFace
88
 
89
+ In your repository, create the .github/workflows/ directory to store your workflow files:
90
+ - actions_onpull.yaml
91
+ - actions_onpush.yaml
92
 
93
  in order to push on Github repo we need to type:
94
  git push github_repo