Spaces:
Paused
Paused
Download backend/Dockerfile from Luca448/APP-Backend: direct link, hf CLI and curl.
- Browser
- Download file 825 Bytes
-
https://huggingface.co/spaces/Luca448/APP-Backend/resolve/main/backend/Dockerfile
- Command line
-
hf download hf://spaces/Luca448/APP-Backend/backend/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Luca448/APP-Backend/resolve/main/backend/Dockerfile
825 Bytes
| FROM python:3.10-slim | |
| # Install basic build tools and curl | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| curl \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Set up a new user named "user" with UID 1000 | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /code | |
| # Copy requirements and install | |
| COPY requirements.txt /code/requirements.txt | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| # Install Playwright browsers and their system dependencies automatically | |
| RUN playwright install --with-deps chromium | |
| # Set permissions for the user | |
| RUN chown -R user:user /code | |
| USER user | |
| # Copy application files | |
| COPY --chown=user:user . /code | |
| # Expose Hugging Face standard port | |
| EXPOSE 7860 | |
| # Run FastAPI app on port 7860 | |
| CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"] | |