Spaces:
Paused
Paused
File size: 701 Bytes
e4b733b cce5ae2 ff66f40 91e7c4e ff66f40 f320be5 ff66f40 f320be5 ff66f40 f320be5 9ed6676 106eed9 a7d7802 f320be5 5450a49 106eed9 cce5ae2 a7d7802 446a113 dcfea26 106eed9 dcfea26 bc23f80 b98feba dcfea26 |
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 |
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"] |