From e414d1d5dba80b26d5370d3c2a4b280a344c0fe1 Mon Sep 17 00:00:00 2001 From: Yoshiki Obinata Date: Wed, 5 Feb 2025 21:17:34 +0900 Subject: [PATCH] restore docker usage --- CMakeLists.txt | 5 +++++ Dockerfile | 3 --- prepare.sh | 17 ----------------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3967afc..244cf27 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,6 +67,7 @@ catkin_package( ) catkin_generate_virtualenv( + PYTHON_INTERPRETER python3 CHECK_VENV FALSE ) @@ -76,6 +77,10 @@ catkin_install_python( DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} ) +install(FILES requirements.txt + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) + if(CATKIN_ENABLE_TESTING) add_custom_target(${PROJECT_NAME}_download_image ALL COMMAND ${PROJECT_SOURCE_DIR}/test/prepare_test_data.sh) diff --git a/Dockerfile b/Dockerfile index 31ec2fd..5dc78fe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -76,9 +76,6 @@ USER user CMD /bin/bash SHELL ["/bin/bash", "-c"] -RUN sudo apt install python3-pip -y -RUN pip3 install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html - ######################################## ########### WORKSPACE BUILD ############ ######################################## diff --git a/prepare.sh b/prepare.sh index 3915988..da4ae40 100755 --- a/prepare.sh +++ b/prepare.sh @@ -9,20 +9,3 @@ cd node_script ln -sf ../Detic/detic ln -sf ../Detic/third_party cd .. - -if [ ! -d "models" ]; then - mkdir models - # All real-time models - # https://github.com/facebookresearch/Detic/blob/main/docs/MODEL_ZOO.md#real-time-models - - # Swin Transformer model - wget -q https://dl.fbaipublicfiles.com/detic/Detic_LCOCOI21k_CLIP_SwinB_896b32_4x_ft4x_max-size.pth -O models/Detic_LCOCOI21k_CLIP_SwinB_896b32_4x_ft4x_max-size.pth - # ConvNet model - wget -q https://dl.fbaipublicfiles.com/detic/Detic_LCOCOI21k_CLIP_CXT21k_640b32_4x_ft4x_max-size.pth -O models/Detic_LCOCOI21k_CLIP_CXT21k_640b32_4x_ft4x_max-size.pth - # Res50 model - wget -q https://dl.fbaipublicfiles.com/detic/Detic_LCOCOI21k_CLIP_R5021k_640b32_4x_ft4x_max-size.pth -O models/Detic_LCOCOI21k_CLIP_R5021k_640b32_4x_ft4x_max-size.pth - # Res18 model - wget -q https://dl.fbaipublicfiles.com/detic/Detic_LCOCOI21k_CLIP_R18_640b32_4x_ft4x_max-size.pth -O models/Detic_LCOCOI21k_CLIP_R18_640b32_4x_ft4x_max-size.pth -fi - -pip3 install -r requirements.txt