Download Dockerfile from attenty/gec: direct link, hf CLI and curl.
- Browser
- Download file 750 Bytes
-
https://huggingface.co/spaces/attenty/gec/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/attenty/gec/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/attenty/gec/resolve/main/Dockerfile
750 Bytes
| FROM python:3.9 | |
| WORKDIR /code | |
| RUN pip install --no-cache-dir --upgrade pip | |
| COPY ./requirements.txt /code/requirements.txt | |
| RUN --mount=type=secret,id=GITHUB_TOKEN,mode=0444,required=true \ | |
| --mount=type=secret,id=MY_NAME,mode=0444,required=true \ | |
| --mount=type=secret,id=REPO_NAME,mode=0444,required=true \ | |
| pip install -e git+https://$(cat /run/secrets/MY_NAME):$(cat /run/secrets/GITHUB_TOKEN)@github.com/$(cat /run/secrets/REPO_NAME)/gec.git#egg=fairseq | |
| RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt | |
| RUN useradd -m -u 1000 user | |
| USER user | |
| ENV HOME=/home/user \ | |
| PATH=/home/user/.local/bin:$PATH | |
| WORKDIR $HOME/app | |
| COPY --chown=user . $HOME/app/ | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |