Leon4gr45 commited on
Commit
0add691
·
verified ·
1 Parent(s): 1aecc68

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -6
Dockerfile CHANGED
@@ -2,20 +2,18 @@ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
 
5
  COPY requirements.txt requirements.txt
6
  RUN pip install --no-cache-dir --default-timeout=100 --retries=5 -r requirements.txt
7
 
8
  ENV HF_HOME=/app/.cache
9
- # Create the cache directory
10
  RUN mkdir -p $HF_HOME && chown -R 1000:1000 $HF_HOME
11
 
12
- # Copy the download script and run it
13
- COPY download_model.py .
14
- RUN python download_model.py
15
-
16
- # Now copy the rest of the application
17
  COPY . .
18
 
 
19
  EXPOSE 7860
20
 
 
21
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install dependencies
6
  COPY requirements.txt requirements.txt
7
  RUN pip install --no-cache-dir --default-timeout=100 --retries=5 -r requirements.txt
8
 
9
  ENV HF_HOME=/app/.cache
 
10
  RUN mkdir -p $HF_HOME && chown -R 1000:1000 $HF_HOME
11
 
12
+ # Copy the app files
 
 
 
 
13
  COPY . .
14
 
15
+ # Expose the port
16
  EXPOSE 7860
17
 
18
+ # START THE SERVER (This line is critical!)
19
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]