Spaces:
Runtime error
Runtime error
Download Dockerfile from lea97338/Files: direct link, hf CLI and curl.
- Browser
- Download file 615 Bytes
-
https://huggingface.co/spaces/lea97338/Files/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/lea97338/Files/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/lea97338/Files/resolve/main/Dockerfile
615 Bytes
| FROM python:3.11-slim | |
| WORKDIR /code | |
| # Install system libraries needed for database drivers | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| libpq-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements and install dependencies in binary mode to avoid compiler blocks | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt --only-binary :all: | |
| # Copy the rest of the application files | |
| COPY . /code | |
| # Hugging Face Spaces routes internal traffic to port 7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |