32 lines
1.3 KiB
Docker
32 lines
1.3 KiB
Docker
FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
|
|
ENV DEBIAN_FRONTEND noninteractive
|
|
|
|
RUN rm -r /etc/apt/sources.list.d/
|
|
|
|
RUN apt-get update -y && apt-get install -y \
|
|
libgl1 libglib2.0-0 google-perftools \
|
|
sudo wget git git-lfs vim tig pkg-config libcairo2-dev \
|
|
telnet curl net-tools iputils-ping wget jq \
|
|
python3-pip python-is-python3 python3.10-venv tzdata lsof && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
RUN pip3 install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple/
|
|
|
|
# add all extensions
|
|
RUN apt-get update -y && apt-get install -y zip && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
RUN pip install wandb tqdm GitPython==3.1.32 Pillow==9.5.0 setuptools --upgrade -i https://mirrors.aliyun.com/pypi/simple/
|
|
|
|
# reinstall torch to keep compatible with xformers
|
|
RUN pip uninstall -qy torch torchvision && \
|
|
pip install torch==2.2.0 torchvision==0.17.0 torchaudio==2.2.0 --index-url https://download.pytorch.org/whl/cu118
|
|
RUN pip uninstall -qy xfromers && pip install xformers==0.0.24 --index-url https://download.pytorch.org/whl/cu118
|
|
|
|
# install requirements
|
|
COPY ./requirements.txt /root/requirements.txt
|
|
RUN pip install -r /root/requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
|
|
RUN rm -rf /root/requirements.txt
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
ENV NVIDIA_DISABLE_REQUIRE 1
|
|
|
|
WORKDIR /root/ |