diff --git a/.github/workflows/fix_env.yml b/.github/workflows/fix_env.yml index 509ae447..d9cae9a5 100644 --- a/.github/workflows/fix_env.yml +++ b/.github/workflows/fix_env.yml @@ -41,7 +41,7 @@ jobs: - name: Install if: github.event_name != 'pull_request' || github.event.action != 'closed' run: | - pip install "$(grep -oE 'pipenv[^ ]+' dockerfiles/notebook/Dockerfile)" + pip install -r requirements.txt pipenv install - if: github.event_name != 'pull_request' || github.event.action != 'closed' run: sed -i -e "s/python_version = \".*\"/python_version = \"${{ steps.get_python_version.outputs.minor_version }}\"/g" Pipfile diff --git a/dockerfiles/notebook/Dockerfile b/dockerfiles/notebook/Dockerfile index 57f4aafa..8fb683a5 100644 --- a/dockerfiles/notebook/Dockerfile +++ b/dockerfiles/notebook/Dockerfile @@ -19,13 +19,14 @@ RUN apt-get update \ USER jovyan WORKDIR /home/jovyan +COPY requirements.txt . COPY Pipfile . COPY Pipfile.lock . COPY install.R . -RUN pip install --no-cache-dir pipenv==2024.0.1 \ +RUN pip install --no-cache-dir -r requirements.txt \ && pipenv install --system \ && Rscript install.R \ - && rm -rf Pipfile* install.R .cache/R/pkgcache/sysreqs/docker/*/Dockerfile /tmp/* /var/tmp/* .npm/ + && rm -rf requirements.txt Pipfile* install.R .cache/R/pkgcache/sysreqs/docker/*/Dockerfile /tmp/* /var/tmp/* .npm/ HEALTHCHECK --interval=5s --retries=20 CMD ["curl", "-s", "-S", "-o", "/dev/null", "http://localhost:8888"] diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 00000000..34b9e5c4 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +pipenv==2024.0.1