Spaces:
Running
Running
Download Dockerfile.custom_quiz from HomemadeMirpur/ed-cad-ref: direct link, hf CLI and curl.
- Browser
- Download file 886 Bytes
-
https://huggingface.co/spaces/HomemadeMirpur/ed-cad-ref/resolve/main/Dockerfile.custom_quiz
- Command line
-
hf download hf://spaces/HomemadeMirpur/ed-cad-ref/Dockerfile.custom_quiz
-
curl -L -o Dockerfile.custom_quiz https://huggingface.co/spaces/HomemadeMirpur/ed-cad-ref/resolve/main/Dockerfile.custom_quiz
886 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libgomp1 \ | |
| build-essential \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --no-cache-dir --timeout=1000 -r /app/requirements.txt | |
| COPY . /app | |
| RUN useradd -m -u 1000 appuser && \ | |
| mkdir -p /app/sources/custom_quiz /app/faiss_storage_custom_quiz \ | |
| /tmp/transformers_cache /tmp/hf_home /tmp/torch_home && \ | |
| chown -R appuser:appuser /app /tmp/transformers_cache /tmp/hf_home /tmp/torch_home | |
| USER appuser | |
| ENV PORT=7861 \ | |
| TRANSFORMERS_CACHE=/tmp/transformers_cache \ | |
| HF_HOME=/tmp/hf_home \ | |
| TORCH_HOME=/tmp/torch_home | |
| EXPOSE 7861 | |
| CMD ["gunicorn", "--bind", "0.0.0.0:7861", "--workers", "1", "--threads", "8", "--timeout", "180", "--access-logfile", "-", "--error-logfile", "-", "custom_quiz_app:app"] | |