mvasim commited on
Commit
b7b86e2
1 Parent(s): 2cd4391

download hf cli

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -8
Dockerfile CHANGED
@@ -1,10 +1,10 @@
1
- # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
- # you will also find guides on how best to write your Dockerfile
3
-
4
  FROM python:3.9
5
 
6
  WORKDIR /code
7
 
 
 
 
8
  ENV REPO=TheBloke/Llama-2-7B-Chat-GGUF
9
  ENV MODEL_NAME=llama-2-7b-chat.Q5_K_M.gguf
10
 
@@ -14,10 +14,11 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
14
 
15
  COPY . .
16
 
 
17
  RUN huggingface-cli download \
18
- ${REPO} \
19
- ${MODEL_NAME}\
20
- --local-dir . \
21
- --local-dir-use-symlinks False
22
 
23
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
1
  FROM python:3.9
2
 
3
  WORKDIR /code
4
 
5
+ # Install huggingface-cli
6
+ RUN pip install --no-cache-dir huggingface_hub
7
+
8
  ENV REPO=TheBloke/Llama-2-7B-Chat-GGUF
9
  ENV MODEL_NAME=llama-2-7b-chat.Q5_K_M.gguf
10
 
 
14
 
15
  COPY . .
16
 
17
+ # Download the model
18
  RUN huggingface-cli download \
19
+ ${REPO} \
20
+ ${MODEL_NAME} \
21
+ --local-dir . \
22
+ --local-dir-use-symlinks False
23
 
24
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]