prompt-generator / Dockerfile
gleisonnanet's picture
fix02
02d730b
raw
history blame contribute delete
551 Bytes
FROM python:3.9
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
ENV HF_HOME=/code/transformers_cache
ENV TRANSFORMERS_CACHE=/code/transformers_cache
ENV HF_DATASETS_CACHE=/code/datasets_cache
ENV TOKENIZERS_PARALLELISM=true
VOLUME /code/transformers_cache
VOLUME /code/datasets_cache
VOLUME /code/app
VOLUME /code/models
COPY . .
RUN transformers-cli download succinctly/text2image-prompt-generator
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]