Download Dockerfile from Waredocs/model1: direct link, hf CLI and curl.
- Browser
- Download file 502 Bytes
-
https://huggingface.co/spaces/Waredocs/model1/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Waredocs/model1/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Waredocs/model1/resolve/main/Dockerfile
502 Bytes
| FROM python:3.9 | |
| # Create user and set ownership/permissions | |
| RUN useradd -m user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| # Switch to user before operations that need write permissions | |
| USER user | |
| WORKDIR $HOME/app | |
| # Copy files with correct ownership | |
| COPY --chown=user:user ./ ${HOME}/app | |
| # Install requirements as user | |
| RUN pip install --user -r requirements.txt | |
| # Expose port if needed (optional) | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] |