Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -5
Dockerfile
CHANGED
|
@@ -8,15 +8,18 @@ RUN apt-get update && apt-get install -y \
|
|
| 8 |
curl \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
-
#
|
| 12 |
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
-
# Copy
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
-
#
|
| 19 |
ENV PORT=7860
|
| 20 |
|
| 21 |
-
#
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
curl \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
# Install Python dependencies
|
| 12 |
COPY requirements.txt .
|
| 13 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 14 |
|
| 15 |
+
# Copy application code
|
| 16 |
COPY . .
|
| 17 |
|
| 18 |
+
# Set environment variable for HF Spaces
|
| 19 |
ENV PORT=7860
|
| 20 |
|
| 21 |
+
# Expose port
|
| 22 |
+
EXPOSE 7860
|
| 23 |
+
|
| 24 |
+
# Run the FastAPI app
|
| 25 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|