test-gpu / Dockerfile
xianbao's picture
xianbao HF staff
Create Dockerfile
dfd5b0b
FROM docker.io/nvidia/cuda:11.3.1-cudnn8-devel-ubuntu18.04@sha256:17a524d7ec68702e6f1750d486b3434888606aede0de4588a84334208b407bb8
WORKDIR /home/user/app
RUN mkdir app
RUN curl https://pyenv.run | bash
RUN apt-get update && xargs -r -a /root/packages.txt apt-get install -y
RUN apt-get update && apt-get install -y git-lfs
RUN git lfs install
RUN apt-get update && apt-get install -y ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx
COPY packages.txt /root/packages.txt
RUN pyenv install 3.8.9
RUN pyenv global 3.8.9
COPY requirements.txt /home/user/app/requirements.txt
RUN pip install -r requirements.txt
RUN pip install --upgrade pip setuptools wheel
WORKDIR /home/user
RUN useradd -m -u 1000 user
RUN pip install streamlit==1.10.0 "protobuf<4" "click<8.1" gradio==2.9.0.1
RUN pyenv rehash
RUN pip install datasets huggingface-hub
RUN apt-get update && apt-get install -y git make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
COPY --chown=user --from=lfs /app /home/user/app
COPY --chown=user ./ /home/user/app