Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +22 -0
Dockerfile
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10
|
| 2 |
+
|
| 3 |
+
# Set the working directory in the container
|
| 4 |
+
WORKDIR /app
|
| 5 |
+
|
| 6 |
+
# Copy the requirements.txt file into the container
|
| 7 |
+
COPY requirements.txt .
|
| 8 |
+
|
| 9 |
+
# Install any dependencies specified in requirements.txt
|
| 10 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
+
|
| 12 |
+
# Copy the rest of the working directory contents into the container
|
| 13 |
+
COPY . .
|
| 14 |
+
|
| 15 |
+
# Expose the port that the app runs on
|
| 16 |
+
EXPOSE 8000
|
| 17 |
+
|
| 18 |
+
# Define environment variable
|
| 19 |
+
ENV PYTHONUNBUFFERED=1
|
| 20 |
+
|
| 21 |
+
# Command to run the application
|
| 22 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|