Spaces:
Runtime error
Runtime error
Delete Dockerfile
Browse files- Dockerfile +0 -33
Dockerfile
DELETED
|
@@ -1,33 +0,0 @@
|
|
| 1 |
-
FROM python:3.9-slim
|
| 2 |
-
|
| 3 |
-
# Set working directory
|
| 4 |
-
WORKDIR /app
|
| 5 |
-
|
| 6 |
-
# Install system dependencies
|
| 7 |
-
RUN apt-get update && apt-get install -y \
|
| 8 |
-
build-essential \
|
| 9 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
-
|
| 11 |
-
# Copy requirements first for better caching
|
| 12 |
-
COPY requirements.txt .
|
| 13 |
-
|
| 14 |
-
# Install Python dependencies
|
| 15 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
-
|
| 17 |
-
# Copy application files
|
| 18 |
-
COPY app.py .
|
| 19 |
-
|
| 20 |
-
# Copy model directory (make sure gpu_base_model2 exists)
|
| 21 |
-
# You can also mount this as a volume or download it at runtime
|
| 22 |
-
COPY gpu_base_model2 ./gpu_base_model2
|
| 23 |
-
|
| 24 |
-
# Expose port
|
| 25 |
-
EXPOSE 8000
|
| 26 |
-
|
| 27 |
-
# Health check
|
| 28 |
-
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
| 29 |
-
CMD python -c "import requests; requests.get('http://localhost:8000/health')"
|
| 30 |
-
|
| 31 |
-
# Run the application
|
| 32 |
-
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]
|
| 33 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|