From 17c6eca029423bf02e5d3d68a0eeb31fa6ee4e42 Mon Sep 17 00:00:00 2001 From: Alexis Koralewski Date: Tue, 12 Apr 2022 16:16:04 +0200 Subject: [PATCH] Adding git clone of guitastro in docker build and install of python packages of guistastro, changing pyros.py accordingly --- Dockerfile | 3 ++- docker/PYROS_DOCKER_BUILD.bat | 1 + pyros.py | 9 +++------ 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index cc03a79..b0a4324 100644 --- a/Dockerfile +++ b/Dockerfile @@ -180,7 +180,8 @@ RUN pip install --user click # - But we can at least use it to generate all the requirements*.txt files in a far better format RUN pip install --user pip-tools - +# Installing packages required for Guitastro +RUN pip install --user -r ./vendor/guitastro/install/requirements.txt # Installing packages required for PyROS RUN pip install --user -r ./install/requirements.txt diff --git a/docker/PYROS_DOCKER_BUILD.bat b/docker/PYROS_DOCKER_BUILD.bat index 4f27abd..e7166d4 100755 --- a/docker/PYROS_DOCKER_BUILD.bat +++ b/docker/PYROS_DOCKER_BUILD.bat @@ -1,4 +1,5 @@ #git pull +git clone https://gitlab.irap.omp.eu/aklotz/guitastro.git ../vendor/guitastro/ CURRENT_UID=$(id -u) docker-compose build diff --git a/pyros.py b/pyros.py index 4434f50..269fad2 100755 --- a/pyros.py +++ b/pyros.py @@ -626,20 +626,17 @@ def install_or_update(UPDATE: bool = False, with_packages: bool = True, with_dat change_dir("..") print(os.getcwd()) # 1) clone repo if not yet done - if not os.path.exists(GUITASTRO_PATH): + if not os.path.exists(GUITASTRO_PATH) and not WITH_DOCKER : print("Guitastro : Cloning repository") cloned_repo = Repo.clone_from( "https://gitlab.irap.omp.eu/aklotz/guitastro.git", GUITASTRO_PATH) print("Cloned successfully: ", cloned_repo.__class__ is Repo) # 2) install/update requirements & generate API doc - if os.path.exists(GUITASTRO_PATH): + if os.path.exists(GUITASTRO_PATH) and not WITH_DOCKER: # TODO: update guitastro (git pull from vendor/guitastro/) print("\nGuitastro : Installing/Updating python package dependencies\n") # Upgrade pip if new version available - if WITH_DOCKER: - os.system(VENV_PYTHON + ' -m pip install --user --upgrade pip') - else: - os.system(VENV_PYTHON + ' -m pip install --upgrade pip') + os.system(VENV_PYTHON + ' -m pip install --upgrade pip') # TODO: faire les apt-get intall aussi (indi, ...) venv_pip_install2(GUITASTRO_PATH + '/install/requirements.txt', '-r') #venv_pip_install2(GUITASTRO_PATH + '/install/requirements_linux.txt', '-r') -- libgit2 0.21.2