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

Use ENV for environment variable persistence #1790

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions docker/Dockerfile_centos
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ RUN cmake -DCMAKE_BUILD_TYPE=Release \
-DALICEVISION_USE_POPSIFT=ON -DALICEVISION_USE_CUDA=ON -DALICEVISION_USE_ONNX_GPU=OFF -DALICEVISION_BUILD_DOC=OFF \
-DSWIG_DIR="${AV_INSTALL}/share/swig/4.3.0" -DSWIG_EXECUTABLE="${AV_INSTALL}/bin-deps/swig" \
"${AV_DEV}" || (cat "${AV_BUILD}/CMakeFiles/CMakeOutput.log" "${AV_BUILD}/CMakeFiles/CMakeError.log" && false)

RUN export CPU_CORES=`${AV_DEV}/docker/check-cpu.sh`; \
make -j"${CPU_CORES}" && \
make install && \
make bundle && \
rm -rf "${AV_DEV}" "${AV_BUILD}" && \
echo "export ALICEVISION_SENSOR_DB=${AV_BUNDLE}/share/aliceVision/cameraSensors.db" >> /etc/profile.d/alicevision.sh && \
echo "export ALICEVISION_ROOT=${AV_BUNDLE}" >> /etc/profile.d/alicevision.sh
rm -rf "${AV_DEV}" "${AV_BUILD}"
ENV ALICEVISION_SENSOR_DB=${AV_BUNDLE}/share/aliceVision/cameraSensors.db
ENV ALICEVISION_ROOT=${AV_BUNDLE}
11 changes: 6 additions & 5 deletions docker/Dockerfile_centos_deps
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,16 @@ ENV PATH="/opt/rh/devtoolset-10/root/usr/bin:${PATH}" \
CMAKE_VERSION=3.26.0

COPY dl/vlfeat_K80L3.SIFT.tree ${AV_INSTALL}/share/aliceVision/
RUN echo "export ALICEVISION_VOCTREE=${AV_INSTALL}/share/aliceVision/vlfeat_K80L3.SIFT.tree" > /etc/profile.d/alicevision.sh
ENV ALICEVISION_VOCTREE=${AV_INSTALL}/share/aliceVision/vlfeat_K80L3.SIFT.tree

COPY dl/sphereDetection_Mask-RCNN.onnx ${AV_INSTALL}/share/aliceVision/
RUN echo "export ALICEVISION_SPHERE_DETECTION_MODEL=${AV_INSTALL}/share/aliceVision/sphereDetection_Mask-RCNN.onnx" > /etc/profile.d/alicevision.sh
ENV ALICEVISION_SPHERE_DETECTION_MODEL=${AV_INSTALL}/share/aliceVision/sphereDetection_Mask-RCNN.onnx

COPY dl/fcn_resnet50.onnx ${AV_INSTALL}/share/aliceVision/
RUN echo "export ALICEVISION_SEMANTIC_SEGMENTATION_MODEL=${AV_INSTALL}/share/aliceVision/fcn_resnet50.onnx" > /etc/profile.d/alicevision.sh
ENV ALICEVISION_SEMANTIC_SEGMENTATION_MODEL=${AV_INSTALL}/share/aliceVision/fcn_resnet50.onnx

COPY docker/check-cpu.sh ${AV_DEV}/docker/check-cpu.sh
RUN export CPU_CORES=`${AV_DEV}/docker/check-cpu.sh` && echo "Build multithreading number of cores: ${CPU_CORES}"
RUN echo "Build multithreading number of cores: `${AV_DEV}/docker/check-cpu.sh`"

# Manually install cmake
WORKDIR /opt
Expand Down Expand Up @@ -144,6 +144,7 @@ RUN test -e /usr/local/cuda/lib64/libcublas.so || ln -s /usr/lib64/libcublas.so
# RUN make -j ${CPU_CORES} cctag
# RUN make -j ${CPU_CORES} popsift

RUN cmake --build . -j ${CPU_CORES} && \
RUN export CPU_CORES=`${AV_DEV}/docker/check-cpu.sh` && \
cmake --build . -j ${CPU_CORES} && \
mv "${AV_INSTALL}/bin" "${AV_INSTALL}/bin-deps" && \
rm -rf "${AV_BUILD}"
7 changes: 4 additions & 3 deletions docker/Dockerfile_ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ RUN export CPU_CORES=`${AV_DEV}/docker/check-cpu.sh`; \
"${AV_DEV}" && \
make install -j${CPU_CORES} && \
make bundle && \
rm -rf "${AV_BUILD}" "${AV_DEV}" && \
echo "export ALICEVISION_SENSOR_DB=${AV_BUNDLE}/share/aliceVision/cameraSensors.db" >> /etc/profile.d/alicevision.sh && \
echo "export ALICEVISION_ROOT=${AV_BUNDLE}" >> /etc/profile.d/alicevision.sh
rm -rf "${AV_BUILD}" "${AV_DEV}"

ENV ALICEVISION_SENSOR_DB=${AV_BUNDLE}/share/aliceVision/cameraSensors.db
ENV ALICEVISION_ROOT=${AV_BUNDLE}
11 changes: 6 additions & 5 deletions docker/Dockerfile_ubuntu_deps
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ ENV AV_DEV=/opt/AliceVision_git \
PATH="${PATH}:${AV_BUNDLE}"

COPY dl/vlfeat_K80L3.SIFT.tree ${AV_INSTALL}/share/aliceVision/
RUN echo "export ALICEVISION_VOCTREE=${AV_INSTALL}/share/aliceVision/vlfeat_K80L3.SIFT.tree" > /etc/profile.d/alicevision.sh
ENV ALICEVISION_VOCTREE=${AV_INSTALL}/share/aliceVision/vlfeat_K80L3.SIFT.tree

COPY dl/sphereDetection_Mask-RCNN.onnx ${AV_INSTALL}/share/aliceVision/
RUN echo "export ALICEVISION_SPHERE_DETECTION_MODEL=${AV_INSTALL}/share/aliceVision/sphereDetection_Mask-RCNN.onnx" > /etc/profile.d/alicevision.sh
ENV ALICEVISION_SPHERE_DETECTION_MODEL=${AV_INSTALL}/share/aliceVision/sphereDetection_Mask-RCNN.onnx

COPY dl/fcn_resnet50.onnx ${AV_INSTALL}/share/aliceVision/
RUN echo "export ALICEVISION_SEMANTIC_SEGMENTATION_MODEL=${AV_INSTALL}/share/aliceVision/fcn_resnet50.onnx" > /etc/profile.d/alicevision.sh
ENV ALICEVISION_SEMANTIC_SEGMENTATION_MODEL=${AV_INSTALL}/share/aliceVision/fcn_resnet50.onnx

COPY docker/check-cpu.sh ${AV_DEV}/docker/check-cpu.sh
RUN export CPU_CORES=`${AV_DEV}/docker/check-cpu.sh` && echo "Build multithreading number of cores: ${CPU_CORES}"
RUN echo "Build multithreading number of cores: `${AV_DEV}/docker/check-cpu.sh`"

COPY CMakeLists.txt ${AV_DEV}/
COPY src/cmake/Dependencies.cmake ${AV_DEV}/src/cmake/
Expand Down Expand Up @@ -119,6 +119,7 @@ RUN test -e /usr/local/cuda/lib64/libcublas.so || ln -s /usr/lib/x86_64-linux-gn
# RUN make -j ${CPU_CORES} popsift
# RUN make -j ${CPU_CORES} cctag

RUN cmake --build . -j ${CPU_CORES} && \
RUN export CPU_CORES=`${AV_DEV}/docker/check-cpu.sh` && \
cmake --build . -j ${CPU_CORES} && \
mv "${AV_INSTALL}/bin" "${AV_INSTALL}/bin-deps" && \
rm -rf "${AV_BUILD}"
Loading