Spaces:
Runtime error
Runtime error
Download Dockerfile from tsalkar/field_semantic_mapping: direct link, hf CLI and curl.
- Browser
- Download file 552 Bytes
-
https://huggingface.co/spaces/tsalkar/field_semantic_mapping/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/tsalkar/field_semantic_mapping/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/tsalkar/field_semantic_mapping/resolve/main/Dockerfile
552 Bytes
| # Use lightweight Python | |
| FROM python:3.10-slim | |
| # Create user | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| # Install dependencies | |
| COPY --chown=user requirements.txt ./requirements.txt | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy all your python files | |
| COPY --chown=user . . | |
| # Create the debug directory (required by your utils) | |
| RUN mkdir -p debug_artifacts | |
| # Expose port | |
| EXPOSE 7860 | |
| # Start the API | |
| CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860"] |