forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (24 loc) · 1.09 KB
/
Dockerfile
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
#---
# name: vila
# group: vlm
# depends: [awq, flash-attention, opencv]
# requires: '>=35'
# test: [test.sh, test.py]
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ADD https://api.github.com/repos/NVlabs/VILA/git/refs/heads/main /tmp/vila_version.json
RUN git clone --branch=main --depth=1 --recursive https://github.com/NVlabs/VILA /opt/VILA && \
cd /opt/VILA && \
sed -i 's|torch==.*"|torch"|' pyproject.toml && \
sed -i 's|pytorchvideo==.*"|pytorchvideo"|' pyproject.toml && \
sed -i 's|bitsandbytes==.*"|bitsandbytes"|' pyproject.toml && \
sed -i 's|opencv-python==.*"|opencv-python"|' pyproject.toml && \
cat pyproject.toml | grep torch && \
pip3 install --verbose -e . && \
pip3 install --verbose -e ".[train]" && \
pip3 install --verbose -e ".[eval]"
RUN pip3 install --verbose --no-cache-dir 'transformers==4.37.2' && \
site_pkg_path=$(python3 -c 'import site; print(site.getsitepackages()[0])') && \
cp -rv /opt/VILA/llava/train/transformers_replace/* $site_pkg_path/transformers/ && \
cp -rv /opt/VILA/llava/train/deepspeed_replace/* $site_pkg_path/deepspeed/