Spaces:
Running
Running
Download Dockerfile from stlin/tennetsac: direct link, hf CLI and curl.
- Browser
- Download file 936 Bytes
-
https://huggingface.co/spaces/stlin/tennetsac/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/stlin/tennetsac/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/stlin/tennetsac/resolve/main/Dockerfile
936 Bytes
| # Hugging Face Spaces requires port 7860 | |
| FROM python:3.10-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 | |
| WORKDIR /app | |
| # System dependencies: | |
| # libxrender1, libxext6, libgl1, libglib2.0-0 — required by RDKit and OpenCV | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| git \ | |
| libxrender1 \ | |
| libxext6 \ | |
| libgl1 \ | |
| libglib2.0-0 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install tennetsac + all dependencies missing from its PyPI metadata + web framework | |
| # matplotlib, torchaudio, torchvision are in requirements.txt but not declared in PyPI install_requires | |
| RUN pip install --no-cache-dir \ | |
| tennetsac \ | |
| matplotlib \ | |
| torchaudio \ | |
| torchvision \ | |
| fastapi \ | |
| "uvicorn[standard]" | |
| # Copy application source | |
| COPY backend/ ./backend/ | |
| COPY frontend/ ./frontend/ | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"] | |