tbot / Dockerfile
sam749's picture
Upload folder using huggingface_hub
fbaba48 verified
raw
history blame contribute delete
605 Bytes
FROM python:3.9
ENV HF_HOME=/hf
WORKDIR /code
RUN chmod -R 777 /code
RUN mkdir -p /hf && chmod -R 777 /hf
RUN mkdir -p /code/client-data && chmod -R 777 /code/client-data
COPY ./requirements.txt /code/requirements.txt
COPY ./main.py /code/main.py
# Expose the secret SECRET_EXAMPLE at buildtime and use its value as git remote URL
RUN --mount=type=secret,id=FILE_URL,mode=0444,required=true \
curl -o /code/util.py $(cat /run/secrets/FILE_URL)
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]