Spaces:
Paused
Paused
Download backend/Dockerfile from data-llm-hub/tensorwall: direct link, hf CLI and curl.
- Browser
- Download file 829 Bytes
-
https://huggingface.co/spaces/data-llm-hub/tensorwall/resolve/main/backend/Dockerfile
- Command line
-
hf download hf://spaces/data-llm-hub/tensorwall/backend/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/data-llm-hub/tensorwall/resolve/main/backend/Dockerfile
829 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| gcc \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements first for dependency caching | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application into backend/ subdirectory to preserve import paths | |
| COPY . ./backend/ | |
| # Production settings | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONPATH=/app | |
| # Health check | |
| HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \ | |
| CMD python -c "import urllib.request; urllib.request.urlopen('http://localhost:8000/health/live')" || exit 1 | |
| # Run with production settings | |
| EXPOSE 8000 | |
| CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "2"] | |