From e9c3e5d15313ff7ffc2811ebaaef9dffa2d6a09a Mon Sep 17 00:00:00 2001 From: Masaya Suzuki Date: Sat, 22 Jun 2024 13:36:47 +0900 Subject: [PATCH] =?UTF-8?q?pipenv=E3=81=AE=E3=83=90=E3=83=BC=E3=82=B8?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=82=92requirements.txt=E3=81=A7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/fix_env.yml | 2 +- dockerfiles/notebook/Dockerfile | 5 +++-- requirements.txt | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 requirements.txt 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