File size: 1,297 Bytes
15d40c2 41649f8 15d40c2 41649f8 15d40c2 41649f8 15d40c2 |
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 |
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu18.04
RUN useradd -m -u 1000 user
WORKDIR /home/user/app
RUN apt-get update && apt-get install -y \
git make build-essential libssl-dev zlib1g-dev \
libsqlite3-dev wget llvm libncursesw5-dev xz-utils tk-dev libxml2-dev \
libxmlsec1-dev libffi-dev liblzma-dev git-lfs ffmpeg libsm6 libxext6 cmake \
libgl1-mesa-glx curl nginx espeak-ng openssl libssl1.0-dev libbz2-dev \
libncurses5-dev libreadline-dev \
&& rm -rf /var/lib/apt/lists/* && git lfs install
RUN curl https://pyenv.run | bash
RUN pyenv install 3.8.9 && pyenv global 3.8.9 && pyenv rehash && \
pip install --no-cache-dir --upgrade pip setuptools wheel && \
pip install --no-cache-dir datasets huggingface-hub "protobuf<4" "click<8.1"
COPY ./requirements.txt /home/user/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /home/user/requirements.txt
COPY ./app /home/user/app
COPY ./default /etc/nginx/sites-available
RUN chown -R 1000 /var/log/nginx/ /var/lib/nginx/ /run/ /home/user/app/
#RUN mkdir -p /home/user/.config
#RUN chown -R 1000 /home/user/.config
#RUN chmod 777 /home/user/.config
#RUN mkdir -p /home/user/.cache
#RUN chown -R 1000 /home/user/.cache
#RUN chmod 777 /home/user/.cache
EXPOSE 7860
CMD ["/bin/sh", "/home/user/app/start.sh"]
|