Spaces:
Build error
Build error
Download Dockerfile from csvaldellon/qa_model: direct link, hf CLI and curl.
- Browser
- Download file 613 Bytes
-
https://huggingface.co/spaces/csvaldellon/qa_model/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/csvaldellon/qa_model/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/csvaldellon/qa_model/resolve/main/Dockerfile
613 Bytes
| FROM python:3.8.12-slim-buster | |
| # Install wget and required pip libraries | |
| RUN apt-get update &&\ | |
| apt-get install -y --no-install-recommends wget &&\ | |
| rm -rf /var/lib/apt/lists/* &&\ | |
| pip install --no-cache-dir transformers[torch] uvicorn fastapi | |
| # adds the script defining the QA model to docker | |
| COPY download_model.sh . | |
| # Downloads the required QA model | |
| RUN bash download_model.sh | |
| # copies the app files to the docker image | |
| COPY app/ app/ | |
| # runs our application at the start of the docker image | |
| # CMD ["python", "app/main.py"] | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |