get up to date CUDA and Alphapose repo

This commit is contained in:
Ruben van de Ven 2023-01-19 15:13:29 +01:00
parent 7ea2b73503
commit 8ee0de8f02

View file

@ -1,10 +1,11 @@
# thanks to Paul DeCoursey (optimuspaul@github.com) for inspiration
# see: https://github.com/MVIG-SJTU/AlphaPose/issues/1057
#FROM nvidia/cuda:11.6.0-cudnn8-devel-ubuntu22.04
#TODO: fix deprecation with either of these
FROM nvidia/cuda:11.6.0-devel-ubuntu20.04
#FROM nvidia/cuda:11.6.2-devel-ubuntu20.04
#FROM nvidia/cuda:11.6.0-devel-ubuntu20.04
FROM nvidia/cuda:11.6.2-devel-ubuntu20.04
#FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04
#FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04
@ -44,30 +45,36 @@ RUN pip install pip --upgrade
RUN pip install cython pycocotools
RUN pip install "cython_bbox==0.1.3"
RUN pip install "numpy==1.22.4"
RUN apt install -y python3-tk
RUN python3 -c "import torch; print(torch.version.cuda)"
RUN mkdir /build
RUN cd /build && git clone https://github.com/HaoyiZhu/HalpeCOCOAPI.git
RUN cd /build && git clone https://github.com/WildflowerSchools/AlphaPose.git
RUN cd /build && git clone https://github.com/MVIG-SJTU/AlphaPose.git
RUN cd /build/HalpeCOCOAPI/PythonAPI && python3 setup.py build develop --user
WORKDIR /build/AlphaPose
# from setup.py; see if it avoids installation issues
RUN pip install six
RUN pip install terminaltables scipy matplotlib visdom \
tqdm tensorboardx easydict \
pyyaml halpecocotools \
munkres timm==0.1.20 natsort
RUN TORCH_CUDA_ARCH_LIST="6.1;7.5;8.6" python3 setup.py build develop --user
RUN apt install bc -y && \
pip install boto3 && \
python3 -c "import torchvision.models as tm; tm.resnet152(pretrained=True)"
RUN pip install "cython_bbox==0.1.3"
# TODO: when working, move this dependency up
RUN pip install "numpy==1.22.4"
RUN apt install -y python3-tk
# Resnet 50 is needed for some of the AlphaPose models
# TODO: alternatively make this a build param/tag for resnet50/152
# see: https://stackoverflow.com/questions/33935807/how-to-define-a-variable-in-a-dockerfile#37639938
RUN python3 -c "import torchvision.models as tm; tm.resnet50(pretrained=True)"
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2