Spaces:
Sleeping
Sleeping
Download Dockerfile from Sarvesh3529/Matrix-backend-python: direct link, hf CLI and curl.
- Browser
- Download file 738 Bytes
-
https://huggingface.co/spaces/Sarvesh3529/Matrix-backend-python/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Sarvesh3529/Matrix-backend-python/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Sarvesh3529/Matrix-backend-python/resolve/main/Dockerfile
738 Bytes
| FROM python:3.10-slim | |
| # Install basic system dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/clean/var/lib/apt/lists/* | |
| # Set up user permissions using Debian standard useradd | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # Copy python dependencies and install | |
| COPY --chown=user requirements.txt . | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| # Copy server code | |
| COPY --chown=user . . | |
| # Hugging Face Spaces routes traffic natively through port 7860 | |
| EXPOSE 7860 | |
| ENV PORT=7860 | |
| CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"] |