Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvidia base upgrade to 12.4.1 #279

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
6ae2ff2
Update Dockerfile
tsubramanian Jun 14, 2024
a47428a
Update docker-publish.yaml
tsubramanian Jun 14, 2024
10a4dc4
Update Dockerfile
tsubramanian Jun 14, 2024
12e82ae
Update Dockerfile
tsubramanian Jun 14, 2024
e2c13ff
Update Dockerfile
tsubramanian Jun 14, 2024
4b464b1
Update Dockerfile
tsubramanian Jun 14, 2024
7d26227
Update setup.py
tsubramanian Jun 14, 2024
98fe47e
Update Dockerfile
tsubramanian Jun 14, 2024
a388d84
Update Dockerfile
tsubramanian Jun 15, 2024
2d1b0ce
Update Dockerfile
tsubramanian Jun 15, 2024
b970b80
Update Dockerfile
tsubramanian Jun 15, 2024
f398ba3
Update runtime.txt
tsubramanian Jun 15, 2024
acc2726
Update runtime.txt
tsubramanian Jun 15, 2024
8904210
Create torch.txt
tsubramanian Jun 15, 2024
be177a3
Update requirements.txt
tsubramanian Jun 15, 2024
94e63a9
Update requirements.txt
tsubramanian Jun 15, 2024
8def904
Update torch.txt
tsubramanian Jun 15, 2024
2f8c965
Update runtime.txt
tsubramanian Jun 15, 2024
3e994ca
Create runtime-post.txt
tsubramanian Jun 15, 2024
694feb5
Update Dockerfile
tsubramanian Jun 15, 2024
428fefd
Update Dockerfile
tsubramanian Jun 15, 2024
5443847
Update install.ubuntu.sh
tsubramanian Jun 15, 2024
7bbe0bb
Update install.ubuntu.sh
tsubramanian Jun 15, 2024
efc5d64
Update Dockerfile
tsubramanian Jun 15, 2024
5034962
Update Dockerfile
tsubramanian Jun 15, 2024
711062d
Update Dockerfile
tsubramanian Jun 15, 2024
0dc2950
Update deprecated.sh
tsubramanian Jun 15, 2024
e3c6889
tf version upgrade
tsubramanian Jun 15, 2024
a011a85
tf, torch and keras upgrade
tsubramanian Jun 15, 2024
94799f0
tf, torch and keras upgrade
tsubramanian Jun 15, 2024
1309543
Update runtime.txt
tsubramanian Jun 15, 2024
5dcbef1
setuptools update Dockerfile
tsubramanian Jun 15, 2024
231e1d0
Update runtime.txt
tsubramanian Jun 15, 2024
32dd412
Update Dockerfile
tsubramanian Jun 15, 2024
b8e5d9d
Update install.ubuntu.sh
tsubramanian Jun 15, 2024
38c62b1
Update pyproject.toml
tsubramanian Jun 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/docker-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Build and upload Docker
on:
push:
branches:
- main
- nvidia-base-upgrade12-4-1
tags:
- v*
schedule:
Expand All @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v2
if: github.event_name == 'schedule'
with:
ref: main
ref: nvidia-base-upgrade12-4-1

- uses: actions/checkout@v2
if: github.event_name != 'schedule'
Expand Down
8 changes: 4 additions & 4 deletions devops/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ RUN set -ex \
&& git config --global user.name "Wild Me" \
&& find /wbia/wbia* -name '.git' -type d -print0 | xargs -0 -i /bin/bash -c \
'cd {} && cd .. && echo $(pwd) && git reset --hard origin/main && git pull' \

&& cd /wbia/wbia-plugin-kaggle7/wbia_kaggle7 \
&& git reset --hard origin/main \
&& git pull \
Expand Down Expand Up @@ -131,9 +130,10 @@ RUN set -ex \
opencv-python-headless \
opencv-contrib-python-headless \
&& /virtualenv/env3/bin/pip install --no-cache-dir --upgrade \
opencv-contrib-python-headless \
&& /virtualenv/env3/bin/pip uninstall -y \
nvidia_cublas_cu11
opencv-contrib-python-headless
#\
#&& /virtualenv/env3/bin/pip uninstall -y \
# nvidia_cublas_cu11

# Run smoke tests
# && /virtualenv/env3/bin/python -c "import wbia; from wbia.__main__ import smoke_test; smoke_test()" \
Expand Down
4 changes: 2 additions & 2 deletions devops/_config/deprecated.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ git clone https://github.com/WildMeOrg/wbia-plugin-pie.git
&& /bin/bash run_developer_setup.sh'

/virtualenv/env3/bin/pip install --no-cache-dir \
'tensorflow-gpu==1.15.5' \
'keras==2.2.5'
'tensorflow' \
'keras'

/virtualenv/env3/bin/pip install --no-cache-dir --upgrade \
numpy
Expand Down
34 changes: 20 additions & 14 deletions devops/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
ARG WBIA_UBUNTU_IMAGE=nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu22.04
ARG WBIA_UBUNTU_IMAGE=nvidia/cuda:11.8.0-cudnn8-runtime-ubuntu22.04
#nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04
#nvidia/cuda:12.1.0-cudnn8-runtime-ubuntu22.04
#nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04
#docker pull nvidia/cuda:12.2.2-cudnn8-runtime-ubuntu22.04
#nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04
#nvidia/cuda:11.7.1-cudnn8-runtime-ubuntu22.04

FROM ${WBIA_UBUNTU_IMAGE} as org.wildme.wbia.base

Expand All @@ -22,7 +28,7 @@ RUN set -ex \

# Install package updates and dependencies
RUN set -ex \
&& apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub \
&& apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
software-properties-common \
Expand All @@ -36,11 +42,11 @@ RUN set -ex \
build-essential \
lsb-release \
pkg-config \
# Install Python 3.7
python3.7 \
python3.7-dev \
python3.7-gdbm \
python3.7-distutils \
# Install Python 3.8
python3.8 \
python3.8-dev \
python3.8-gdbm \
python3.8-distutils \
python3-pip \
python3-setuptools \
python3-venv \
Expand Down Expand Up @@ -117,18 +123,18 @@ RUN set -ex \

# Create virtualenvs for Python3
RUN set -ex \
&& virtualenv --system-site-packages -p $(which python3.7) /virtualenv/env3
&& virtualenv --system-site-packages -p $(which python3.8) /virtualenv/env3

# Install PyPI packages
RUN set -ex \
&& /virtualenv/env3/bin/pip install --upgrade \
pip \
&& /virtualenv/env3/bin/pip install setuptools==59.5.0 \
&& /virtualenv/env3/bin/pip install setuptools \
&& /virtualenv/env3/bin/pip install --upgrade \
# Install build requirements
cmake \
ninja \
setuptools==59.5.0 \
setuptools \
scikit-build \
setuptools_scm[toml] \
cython \
Expand All @@ -146,12 +152,12 @@ RUN set -ex \
&& wait-for google.com:80 -- echo "success"

# Set CUDA-specific environment paths
ENV PATH "/usr/local/cuda/bin:${PATH}"

ENV LD_LIBRARY_PATH "/usr/local/cuda/lib64:/virtualenv/env3/lib:${LD_LIBRARY_PATH}"
ENV PATH "/usr/local/nvidia/bin:${PATH}"

ENV LD_LIBRARY_PATH "/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/virtualenv/env3/lib:${LD_LIBRARY_PATH}"

ENV CUDA_HOME "/usr/local/cuda"

ENV CUDA_TOOLKIT_ROOT_DIR "/usr/local/cuda"
ENV CUDA_TOOLKIT_ROOT_DIR "/usr/local/nvidia/cuda"

CMD ["/bin/bash", "-c", "Xvfb :1 -screen 0 1024x768x16 &>/tmp/xvfb.log & /bin/bash"]
4 changes: 3 additions & 1 deletion devops/develop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ RUN /bin/bash -xc '. /virtualenv/env3/bin/activate \
&& pip install --upgrade pip setuptools-scm \
&& pip install --no-cache-dir -r /wbia/wildbook-ia/requirements/tests.txt \
&& pip install --no-cache-dir -r /wbia/wildbook-ia/requirements/runtime.txt \
&& pip install --no-cache-dir -r /wbia/wildbook-ia/requirements/torch.txt \
&& pip install --no-cache-dir -r /wbia/wildbook-ia/requirements/runtime-post.txt \
&& pip install --no-cache-dir -r /wbia/wildbook-ia/requirements/postgres.txt \
&& pip install --no-cache-dir -e .'

# Temporary fix for ARM64
ENV LD_PRELOAD "/virtualenv/env3/lib/python3.7/site-packages/torch/lib/libgomp-d22c30c5.so.1"
ENV LD_PRELOAD "/virtualenv/env3/lib/python3.8/site-packages/torch/lib/libgomp-d22c30c5.so.1"

RUN set -ex \

Expand Down
12 changes: 6 additions & 6 deletions devops/install.ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export OPENCV_VERSION=3.4.11

pip3 install --no-cache-dir virtualenv

virtualenv -p $(which python3.7) ${VENV}
virtualenv -p $(which python3.8) ${VENV}

source ${VENV}/bin/activate

Expand All @@ -78,8 +78,8 @@ pip install --no-cache-dir --upgrade \
'cmake!=3.18.2' \
ninja \
scikit-build \
'setuptools==59.5.0' \
'setuptools_scm[toml]>=3.4' \
'setuptools' \
'setuptools_scm[toml]' \
cython==3.0.0 \
numpy \
ipython
Expand Down Expand Up @@ -178,7 +178,7 @@ pip install --no-cache-dir -e .

pip install --no-cache-dir pygraphviz --install-option="--include-path=/usr/include/graphviz" --install-option="--library-path=/usr/lib/graphviz/"

cp -r ${VIRTUAL_ENV}/lib/python3.7/site-packages/cv2 /tmp/cv2
cp -r ${VIRTUAL_ENV}/lib/python3.8/site-packages/cv2 /tmp/cv2

cd ${CODE}
git clone --branch develop https://github.com/WildMeOrg/wildbook-ia.git
Expand Down Expand Up @@ -307,8 +307,8 @@ pip install --no-cache-dir \
tensorflow-gpu==1.15.4 \
keras==2.2.5

rm -rf ${VIRTUAL_ENV}/lib/python3.7/site-packages/cv2*
cp -r /tmp/cv2 ${VIRTUAL_ENV}/lib/python3.7/site-packages/cv2
rm -rf ${VIRTUAL_ENV}/lib/python3.8/site-packages/cv2*
cp -r /tmp/cv2 ${VIRTUAL_ENV}/lib/python3.8/site-packages/cv2
rm -rf /tmp/cv2

# python -c "import wbia; from wbia.__main__ import smoke_test; smoke_test()"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[build-system]
requires = ["setuptools==59.5.0", "wheel", "setuptools_scm[toml]==6.3.2", "scikit-build", "cmake", "ninja"]
requires = ["setuptools", "wheel", "setuptools_scm[toml]", "scikit-build", "cmake", "ninja"]
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
-r requirements/build.txt
-r requirements/runtime.txt
-r requirements/torch.txt
-r requirements/pinned.txt
-r requirements/tests.txt
13 changes: 13 additions & 0 deletions requirements/runtime-post.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
tornado==6.2
tqdm==4.64.0
ubelt==1.2.1
visdom==0.1.8.9
PyQt5==5.15.9
wbia-lightnet
wbia-pydarknet
wbia-pyflann
wbia-utool @ git+https://github.com/WildMeOrg/wbia-utool@main
wbia-vtool
wbia-pyhesaff
# webargs==5.5.3
# werkzeug==0.15.6
21 changes: 3 additions & 18 deletions requirements/runtime.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ grad-cam==1.4.6
imgaug==0.4.0
ipython==7.34.0
jupyter==1.0.0
keras==2.2.5
keras
line-profiler==3.5.1
lockfile==0.12.2
mako==1.2.2
itsdangerous>=0.24,<2.0
markupsafe<2.0.0
markupsafe==2.0.1
# marshmallow==2.21.0
# marshmallow-sqlalchemy==0.12.1
matplotlib==3.5.3
Expand Down Expand Up @@ -79,19 +79,4 @@ SQLAlchemy-Utils==0.38.3
tensorboard_logger==0.1.0
Theano==1.0.5
timm==0.6.12
torch==1.13.1
torchvision==0.14.1
torchaudio==0.13.1
tornado==6.2
tqdm==4.64.0
ubelt==1.2.1
visdom==0.1.8.9
PyQt5==5.15.9
wbia-lightnet
wbia-pydarknet
wbia-pyflann
wbia-utool @ git+https://github.com/WildMeOrg/wbia-utool@main
wbia-vtool
wbia-pyhesaff
# webargs==5.5.3
# werkzeug==0.15.6

4 changes: 4 additions & 0 deletions requirements/torch.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
--index-url https://download.pytorch.org/whl/cu121
torch==2.1.0
torchvision==0.16.0
torchaudio==2.1.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def gen_packages_items():
'Environment :: Console',
'Environment :: Web Environment',
'Environment :: GPU',
'Environment :: GPU :: NVIDIA CUDA :: 11.0',
'Environment :: GPU :: NVIDIA CUDA :: 12.2',
'Natural Language :: English',
'License :: OSI Approved :: Apache Software License',
'Intended Audience :: Developers',
Expand Down
Loading