forked from dexmal/dexbotic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (33 loc) · 1.92 KB
/
Dockerfile
File metadata and controls
46 lines (33 loc) · 1.92 KB
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
36
37
38
39
40
41
42
43
44
45
46
FROM nvcr.io/nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Asia/Shanghai
RUN sed -i -e "s/archive.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g" /etc/apt/sources.list && \
sed -i -e "s/security.ubuntu.com/mirrors.tuna.tsinghua.edu.cn/g" /etc/apt/sources.list && \
rm -rf /var/lib/apt/lists/* && \
apt-get clean && apt-get update -y && \
apt-get install --assume-yes --fix-missing build-essential && \
apt-get install -y openssh-server vim git curl tmux && \
rm -rf /var/lib/apt/lists/* && apt-get clean
RUN wget -q https://repo.anaconda.com/miniconda/Miniconda3-py310_25.5.1-1-Linux-x86_64.sh -O /tmp/miniconda.sh && \
bash /tmp/miniconda.sh -b -p /opt/conda && \
rm /tmp/miniconda.sh
ENV PATH=/opt/conda/bin:$PATH
RUN /opt/conda/bin/conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/main && \
/opt/conda/bin/conda tos accept --override-channels --channel https://repo.anaconda.com/pkgs/r
RUN /opt/conda/bin/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/ && \
/opt/conda/bin/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ && \
/opt/conda/bin/conda config --set show_channel_urls yes && \
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
WORKDIR /app
COPY dexbotic/ /app/dexbotic/
COPY pyproject.toml /app/pyproject.toml
RUN /opt/conda/bin/conda create -n dexbotic python=3.10 -y && \
/bin/bash -c "source activate dexbotic && \
pip install torch==2.2.2 torchvision==0.17.2 xformers --index-url https://download.pytorch.org/whl/cu118 && \
pip install -e . && pip install transformers==4.51.0"
RUN /bin/bash -c "source activate dexbotic && \
pip install ninja && \
pip install packaging && \
MAX_JOBS=2 pip install flash-attn --no-build-isolation"
RUN /opt/conda/bin/conda init bash
CMD ["bash"]