Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -10
Dockerfile
CHANGED
|
@@ -1,22 +1,18 @@
|
|
| 1 |
-
# Use official Python image
|
| 2 |
-
FROM python:3.10
|
| 3 |
|
| 4 |
-
# Set
|
| 5 |
-
ENV PYTHONDONTWRITEBYTECODE=1
|
| 6 |
-
ENV PYTHONUNBUFFERED=1
|
| 7 |
-
|
| 8 |
-
# Set work directory
|
| 9 |
WORKDIR /app
|
| 10 |
|
| 11 |
-
#
|
| 12 |
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
-
# Copy project
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
# Expose port
|
| 19 |
EXPOSE 7860
|
| 20 |
|
| 21 |
-
# Run the
|
| 22 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
+
# Use official Python base image
|
| 2 |
+
FROM python:3.10
|
| 3 |
|
| 4 |
+
# Set working directory
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Copy requirements and install dependencies
|
| 8 |
COPY requirements.txt .
|
| 9 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
|
| 11 |
+
# Copy entire project
|
| 12 |
COPY . .
|
| 13 |
|
| 14 |
# Expose port
|
| 15 |
EXPOSE 7860
|
| 16 |
|
| 17 |
+
# Run the app
|
| 18 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|