up
Browse files- Dockerfile +2 -9
Dockerfile
CHANGED
|
@@ -2,21 +2,14 @@ FROM python:3.11-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
#
|
| 6 |
-
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 7 |
-
build-essential curl && \
|
| 8 |
-
rm -rf /var/lib/apt/lists/*
|
| 9 |
-
|
| 10 |
-
# Copy requirements and install Python deps
|
| 11 |
COPY requirements.txt .
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
# Copy application code
|
| 15 |
COPY main.py .
|
| 16 |
-
COPY .env* ./ 2>/dev/null || true
|
| 17 |
|
| 18 |
-
# Expose port
|
| 19 |
EXPOSE 7860
|
| 20 |
|
| 21 |
-
# HuggingFace Spaces expects the app to run on port 7860
|
| 22 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Copy and install Python dependencies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
COPY requirements.txt .
|
| 7 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 8 |
|
| 9 |
# Copy application code
|
| 10 |
COPY main.py .
|
|
|
|
| 11 |
|
| 12 |
+
# Expose HuggingFace Spaces default port
|
| 13 |
EXPOSE 7860
|
| 14 |
|
|
|
|
| 15 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|