mikmc5 commited on
Commit
07520e6
·
verified ·
1 Parent(s): 154f634

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -2
Dockerfile CHANGED
@@ -1,9 +1,18 @@
1
- """
2
  FROM python:3.9-slim
 
 
3
  WORKDIR /app
 
 
4
  COPY requirements.txt .
5
  RUN pip install --no-cache-dir -r requirements.txt
 
 
6
  COPY . .
 
 
7
  EXPOSE 8000
 
 
8
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
9
- """
 
1
+ # Use a minimal Python image
2
  FROM python:3.9-slim
3
+
4
+ # Set the working directory
5
  WORKDIR /app
6
+
7
+ # Copy and install dependencies
8
  COPY requirements.txt .
9
  RUN pip install --no-cache-dir -r requirements.txt
10
+
11
+ # Copy application files
12
  COPY . .
13
+
14
+ # Expose port 8000
15
  EXPOSE 8000
16
+
17
+ # Run the FastAPI app with Uvicorn
18
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]