RishiXD commited on
Commit
6dcabb7
·
verified ·
1 Parent(s): 9ca8899

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -23
Dockerfile CHANGED
@@ -1,23 +1,23 @@
1
- # Use the official Python image
2
- FROM python:3.9-slim
3
-
4
- # Set the working directory
5
- WORKDIR /app
6
-
7
- # Install system dependencies
8
- RUN apt-get update && apt-get install -y --no-install-recommends \
9
- libgl1-mesa-glx \
10
- libglib2.0-0 \
11
- && rm -rf /var/lib/apt/lists/*
12
-
13
- # Copy all files to the container
14
- COPY . /app
15
-
16
- # Install required Python packages
17
- RUN pip install --no-cache-dir -r requirements.txt
18
-
19
- # Expose the port Flask will run on
20
- EXPOSE 7860
21
-
22
- # Run the Flask app
23
- CMD ["python", "app.py"]
 
1
+ # Use a slim Python base
2
+ FROM python:3.9-slim
3
+
4
+ # Set working dir
5
+ WORKDIR /app
6
+
7
+ # (Optional) If you don’t need GUI support, you can skip these.
8
+ #RUN apt-get update \
9
+ # && apt-get install -y --no-install-recommends libgl1-mesa-glx libglib2.0-0 \
10
+ # && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Copy source & install deps
13
+ COPY requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ COPY . .
17
+
18
+ # Expose the port your FastAPI listens on
19
+ ENV PORT=5000
20
+ EXPOSE ${PORT}
21
+
22
+ # In production, call Uvicorn directly (no reload)
23
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "5000"]