Spaces:
Paused
Paused
Update Dockerfile
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
|
@@ -1,20 +1,20 @@
|
|
| 1 |
-
# Use
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
-
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Copy
|
| 8 |
COPY requirements.txt .
|
| 9 |
|
| 10 |
# Install dependencies
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
-
# Copy application
|
| 14 |
COPY . .
|
| 15 |
|
| 16 |
-
# Expose the port
|
| 17 |
EXPOSE 8000
|
| 18 |
|
| 19 |
-
# Start the
|
| 20 |
-
CMD ["
|
|
|
|
| 1 |
+
# Use the official Python base image
|
| 2 |
FROM python:3.9-slim
|
| 3 |
|
| 4 |
+
# Set the working directory inside the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy the requirements file to the working directory
|
| 8 |
COPY requirements.txt .
|
| 9 |
|
| 10 |
# Install dependencies
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
+
# Copy the application content to the working directory
|
| 14 |
COPY . .
|
| 15 |
|
| 16 |
+
# Expose the port on which the application will run (FastAPI default is 8000)
|
| 17 |
EXPOSE 8000
|
| 18 |
|
| 19 |
+
# Start the application using Gunicorn
|
| 20 |
+
CMD ["gunicorn", "app:app", "--bind", "0.0.0.0:8000", "--log-level", "debug", "--access-logfile", "-"]
|