oop-deploy / Dockerfile
E-Hospital's picture
Update Dockerfile
a7d7802
raw
history blame
No virus
701 Bytes
FROM nvidia/cuda:11.8.0-base-ubuntu22.04
WORKDIR /code
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update
RUN apt install software-properties-common -y
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt install -y python3.10 python3.10-distutils python3-pip
RUN python3 -m pip install pip==23.1.2
RUN apt-get install -y git-all
COPY ./requirements.txt /code/requirements.txt
RUN pip3 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
ENV CUDA_VISIBLE_DEVICES=0,1,2
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]