Bunpheng commited on
Commit
20cb915
·
verified ·
1 Parent(s): 68973dc

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -15
Dockerfile CHANGED
@@ -16,28 +16,23 @@
16
  # CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
17
 
18
  # Use a base image with Python and necessary dependencies
19
- FROM python:3.10-slim
20
-
21
- # Set environment variables
22
- ENV PYTHONDONTWRITEBYTECODE=1
23
- ENV PYTHONUNBUFFERED=1
24
 
25
  # Set the working directory
26
  WORKDIR /app
27
 
28
- # Install necessary packages
29
- COPY requirements.txt .
30
- RUN pip install --no-cache-dir -r requirements.txt
31
-
32
- # Copy the application code and model download script
33
  COPY . .
34
 
35
- # Run the model download script
36
- RUN python download_model.py
 
37
 
38
- # Expose the port the app runs on
39
- EXPOSE 8000
40
 
41
  # Command to run the FastAPI app
42
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
 
43
 
 
16
  # CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
17
 
18
  # Use a base image with Python and necessary dependencies
19
+ # Use an appropriate base image
20
+ FROM python:3.9
 
 
 
21
 
22
  # Set the working directory
23
  WORKDIR /app
24
 
25
+ # Copy the necessary files
 
 
 
 
26
  COPY . .
27
 
28
+ # Install dependencies
29
+ RUN pip install --upgrade pip
30
+ RUN pip install -r requirements.txt
31
 
32
+ # Run the script to download the model
33
+ RUN python download_model.py
34
 
35
  # Command to run the FastAPI app
36
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
37
+
38