Spaces:
Paused
Paused
File size: 723 Bytes
d97d89f cce5ae2 d97d89f e9875b6 d97d89f cce5ae2 a7d7802 446a113 dcfea26 106eed9 dcfea26 bc23f80 b98feba dcfea26 d97d89f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
FROM nvidia/cuda:11.8.0-base-ubuntu22.04
WORKDIR /code
RUN apt update
ENV DEBIAN_FRONTEND=noninteractive
RUN apt install software-properties-common -y
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt install -y python3.9 python3.9-distutils python3-pip
# Install pip 23.1.2
RUN python3.9 -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"]
|