2022-10-19 11:25:02 +00:00
|
|
|
FROM nvidia/cuda:11.6.0-base-ubuntu20.04
|
|
|
|
RUN apt-get update && apt-get install python3 python3-pip -y
|
|
|
|
|
2022-10-24 05:25:57 +00:00
|
|
|
RUN pip3 install --upgrade diffusers transformers scipy python-dotenv cuda-python fastapi uvicorn httplib2 && \
|
2022-10-19 11:25:02 +00:00
|
|
|
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117 && \
|
|
|
|
pip install torch==1.11.0+cu115 torchvision==0.12.0+cu115 torchaudio==0.11.0+cu115 -f https://download.pytorch.org/whl/torch_stable.html
|
|
|
|
|
2022-10-21 04:42:28 +00:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY main.py /app/main.py
|
|
|
|
VOLUME /root/.cache/huggingface/diffusers/
|
|
|
|
|
|
|
|
|
|
|
|
CMD [ "uvicorn", "main:app", "--host", "0.0.0.0" ]
|