FROM python:3.8.10-slim WORKDIR /app # install linux package dependencies RUN apt-get update -y # can copy files only from current working directory where docker builds # cannot copy files from arbitrary directories COPY ./artifacts/ /data/models/ COPY ./requirements.txt . RUN pip install --no-cache-dir torch==1.11.0+cpu torchvision==0.12.0+cpu torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cpu RUN pip install -r requirements.txt COPY ./image_colourization_cgan/*.py ./image_colourization_cgan/ COPY ./*.py . EXPOSE 7860 CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]