-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile_rocky
More file actions
61 lines (40 loc) · 1.79 KB
/
Copy pathDockerfile_rocky
File metadata and controls
61 lines (40 loc) · 1.79 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
ARG CUDA_VERSION
ARG ROCKY_VERSION
FROM nvidia/cuda:${CUDA_VERSION}-devel-rockylinux${ROCKY_VERSION}
LABEL maintainer="AliceVision Team alicevision-team@googlegroups.com"
ENV MRPLUGIN_DEV=/opt/MeshroomPlugin_dev \
MRPLUGIN_BUILD=/tmp/MeshroomPlugin_build \
MRPLUGIN_BUNDLE=/opt/MeshroomPlugin
COPY ./ ${MRPLUGIN_DEV}/
## Install Basic Tools
## ===================
RUN dnf update -y
# Setup Python
RUN dnf install -y python3.11-devel python3.11-pip git git-lfs
RUN ln -s /usr/bin/python3.11 /usr/bin/python
RUN python -m pip install --upgrade setuptools
## Install the requirements
## ========================
RUN python -m venv ${MRPLUGIN_BUNDLE}
WORKDIR ${MRPLUGIN_BUNDLE}
RUN ${MRPLUGIN_BUNDLE}/bin/pip install -r ${MRPLUGIN_DEV}/requirements.txt
RUN ${MRPLUGIN_BUNDLE}/bin/pip install -r ${MRPLUGIN_DEV}/torch-requirements.txt --upgrade --force-reinstall
## Copy nodes and templates
## ========================
RUN cp -R ${MRPLUGIN_DEV}/meshroom ${MRPLUGIN_BUNDLE}/
RUN cp -R ${MRPLUGIN_DEV}/segmentationRDS ${MRPLUGIN_BUNDLE}/
## Download the models
## ===================
RUN git clone --depth 1 https://gitlab.com/alicevision/imagepromptnnmodels.git repo && \
cd repo && git lfs install && git lfs pull && mv models .. && cd .. && rm -rf repo
## Set all the variables
## =====================
ENV RDS_RECOGNITION_MODEL_PATH="${MRPLUGIN_BUNDLE}/models/ram_plus_swin_large_14m.pth" \
RDS_DETECTION_CONFIG_PATH="${MRPLUGIN_BUNDLE}/models/GroundingDINO_SwinT_OGC.py" \
RDS_DETECTION_MODEL_PATH="${MRPLUGIN_BUNDLE}/models/groundingdino_swint_ogc.pth" \
RDS_SEGMENTATION_MODEL_PATH="${MRPLUGIN_BUNDLE}/models/sam_vit_h_4b8939.pth" \
RDS_TOKENIZER_PATH="${MRPLUGIN_BUNDLE}/models/tokenizer" \
TRANSFORMERS_OFFLINE="TRUE"
## Clean-up
## ========
RUN rm -rf share && rm pyvenv.cfg