Download Dockerfile from Juslin/elim-api: direct link, hf CLI and curl.
- Browser
- Download file 1.09 kB
-
https://huggingface.co/spaces/Juslin/elim-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Juslin/elim-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Juslin/elim-api/resolve/main/Dockerfile
1.09 kB
| FROM python:3.13 | |
| ENV HF_HOME=/app/model_cache | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| RUN rm -rf /app/model_cache && mkdir -p /app/model_cache && chmod -R 777 /app/model_cache | |
| # System packages | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl \ | |
| cmake \ | |
| build-essential \ | |
| pkg-config \ | |
| libprotobuf-dev \ | |
| protobuf-compiler \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --upgrade pip \ | |
| && pip install --no-cache-dir -r requirements.txt | |
| # β INTERNET CONNECTIVITY CHECK | |
| RUN echo "π Checking internet connection to huggingface.co..." && \ | |
| curl -sSf https://huggingface.co > /dev/null || (echo "β No internet access! Cannot reach huggingface.co." && exit 1) | |
| # π Inspect cache | |
| RUN echo 'π Listing /app:' && ls -al /app && \ | |
| echo 'π Listing /app/hf_cache:' && ls -al /app/model_cache && \ | |
| echo 'π Model folders:' && find /app/model_cache -type d | |
| COPY . . | |
| EXPOSE 7860 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] |