Dash-inc commited on
Commit
d4da6dc
·
verified ·
1 Parent(s): 544fc6a

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -1
Dockerfile CHANGED
@@ -1,8 +1,21 @@
 
1
  FROM python:3.9-slim
2
 
 
 
 
 
 
3
  WORKDIR /app
 
 
4
  COPY . /app
5
 
 
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
8
- CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
 
 
 
 
 
1
+ # Use an official Python runtime as a parent image
2
  FROM python:3.9-slim
3
 
4
+ # Set environment variables
5
+ ENV PYTHONUNBUFFERED=1 \
6
+ PYTHONFAULTHANDLER=1
7
+
8
+ # Set the working directory in the container
9
  WORKDIR /app
10
+
11
+ # Copy the current directory contents into the container at /app
12
  COPY . /app
13
 
14
+ # Install required packages
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
+ # Expose the port the app runs on
18
+ EXPOSE 7860
19
+
20
+ # Run the FastAPI app with Uvicorn
21
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]