benjolo commited on
Commit
6a8ed96
1 Parent(s): 756a5f6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -12
Dockerfile CHANGED
@@ -5,24 +5,26 @@ FROM python:3.10.9
5
  COPY . .
6
 
7
  # Install OS Libs
8
- # RUN apt-get update \
9
- # && apt-get -y install ffmpeg
10
 
11
  # Change to backend as working directory
12
  WORKDIR backend/
13
 
14
  # Install requirements.txt
15
- # RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
16
- # RUN pip install git+https://github.com/huggingface/transformers.git
17
- # RUN pip install pydantic[email]
18
-
19
- # Start the FastAPI app on port 7860, the default port expected by Spaces
20
- # CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
21
- # CMD ["gunicorn", "-b", "0.0.0.0:7860","main:app","--workers","1","-k","uvicorn.workers.UvicornWorker"]
22
 
 
 
23
  # RUN ls -al
24
 
25
- RUN chmod -R 777 ./
26
- RUN ls -al
 
27
 
28
- RUN echo $TRANSFORMERS_CACHE
 
 
 
 
5
  COPY . .
6
 
7
  # Install OS Libs
8
+ RUN apt-get update \
9
+ && apt-get -y install ffmpeg
10
 
11
  # Change to backend as working directory
12
  WORKDIR backend/
13
 
14
  # Install requirements.txt
15
+ RUN pip install --no-cache-dir --upgrade -r ./requirements.txt
16
+ RUN pip install git+https://github.com/huggingface/transformers.git
17
+ RUN pip install pydantic[email]
 
 
 
 
18
 
19
+ # Make all files and folders readable, writable, executable
20
+ RUN chmod -R 777 ./
21
  # RUN ls -al
22
 
23
+ # Start the FastAPI app on port 7860, the default port expected by Spaces
24
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
25
+ # CMD ["gunicorn", "-b", "0.0.0.0:7860","main:app","--workers","1","-k","uvicorn.workers.UvicornWorker"]
26
 
27
+ RUN echo "$TRANSFORMERS_CACHE"
28
+ RUN echo "$HF_ASSETS_CACHE"
29
+ RUN echo "$HF_HUB_CACHE"
30
+ RUN echo "$HF_HOME"