Download Dockerfile from fugthchat/MEPLIFEOS: direct link, hf CLI and curl.
- Browser
- Download file 987 Bytes
-
https://huggingface.co/spaces/fugthchat/MEPLIFEOS/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/fugthchat/MEPLIFEOS/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/fugthchat/MEPLIFEOS/resolve/main/Dockerfile
987 Bytes
| FROM python:3.11-slim-bookworm | |
| ENV PYTHONDONTWRITEBYTECODE=1 \ | |
| PYTHONUNBUFFERED=1 \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| HF_HOME=/data/hf \ | |
| MODEL_DIR=/data/models \ | |
| PORT=7860 | |
| # No build-essential/cmake: using pre-built llama-cpp-python CPU wheels. | |
| # Only install a wheel; fail fast rather than compiling on a 2-vCPU Space. | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libgomp1 ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| COPY requirements.txt ./ | |
| RUN python -m pip install --upgrade pip \ | |
| && python -m pip install --only-binary=llama-cpp-python \ | |
| --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu \ | |
| -r requirements.txt | |
| COPY app.py index.html ./ | |
| RUN useradd -m -u 1000 user \ | |
| && mkdir -p /data/models /data/hf \ | |
| && chown -R user:user /data /app | |
| USER user | |
| EXPOSE 7860 | |
| CMD ["python", "-m", "uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1", "--no-access-log"] | |