Spaces:
Runtime error
Runtime error
File size: 1,518 Bytes
7191ca8 4ac6ada 7191ca8 c26003e 7191ca8 3fa2787 7191ca8 |
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 |
FROM nvidia/cuda:11.3.1-cudnn8-devel-ubuntu18.04
RUN useradd -m -u 1000 user
WORKDIR /home/user/app
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
git make build-essential 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 libssl-dev libbz2-dev \
libncurses5-dev libreadline-dev \
vim lynx haproxy \
&& rm -rf /var/lib/apt/lists/* && git lfs install
RUN wget https://github.com/tsl0922/ttyd/releases/download/1.7.3/ttyd.x86_64 -O /usr/local/bin/ttyd && \
chmod 755 /usr/local/bin/ttyd
RUN chown -R 1000 /var/log/nginx/ /var/lib/nginx/ /run/
USER user
ENV HOME /home/user
ENV PYENV_ROOT $HOME/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN git clone https://github.com/yyuu/pyenv.git $HOME/.pyenv
#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 --chown=user:user ./requirements.txt /home/user/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /home/user/requirements.txt
COPY --chown=user:user ./app /home/user/app
COPY ./default /etc/nginx/sites-available
COPY --chown=user:user ./htpasswd /etc/nginx
EXPOSE 7860
CMD ["/bin/sh", "/home/user/app/start.sh"]
|