Download Dockerfile from OPEN-ACCESS-BIODATA/mtDNAclassifier_flask: direct link, hf CLI and curl.
- Browser
- Download file 671 Bytes
-
https://huggingface.co/spaces/OPEN-ACCESS-BIODATA/mtDNAclassifier_flask/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/OPEN-ACCESS-BIODATA/mtDNAclassifier_flask/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/OPEN-ACCESS-BIODATA/mtDNAclassifier_flask/resolve/main/Dockerfile
671 Bytes
| # Use a small Python base image | |
| FROM python:3.10 | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| # Fast, clean installs | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| PORT=7860 | |
| WORKDIR /app | |
| # Copy your app | |
| COPY ./requirements.txt /app/requirements.txt | |
| # Install Python deps | |
| RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt | |
| RUN getent passwd user || useradd -m -u 1000 user | |
| USER user | |
| ENV PATH="/home/user/.local/bin:${PATH}" | |
| COPY --chown=user . /app | |
| # Expose the port Hugging Face expects | |
| EXPOSE 7860 | |
| # Run your app (it will read $PORT below) | |
| CMD ["gunicorn", "-k", "eventlet", "-w", "1", "-b", "0.0.0.0:7860", "app:app"] |