From c9250e817bf3948c2d2caf8eb0c712e1052756e7 Mon Sep 17 00:00:00 2001 From: Yevhenii Semendiak Date: Tue, 3 Aug 2021 19:06:59 +0200 Subject: [PATCH] Refactor requirements installation and dependabot config (#144) * refactor requirements installation and dependabot * fix dockerfile * fix dockerfile (2) * remove unneded neuro-sdk installation in CI --- .github/dependabot.yml | 16 ++++++++++++---- .github/workflows/ci.yaml | 16 ++++++++++++---- requirements/neuro.txt | 3 +++ .../Dockerfile | 17 ++++++----------- 4 files changed, 33 insertions(+), 19 deletions(-) create mode 100644 requirements/neuro.txt diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c359458b..4af60903 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,13 +6,21 @@ updates: interval: daily time: "03:00" open-pull-requests-limit: 10 - assignees: - - anayden - - artemlops - - YevheniiSemendiak + reviewers: + - neuro-inc/mlops - package-ecosystem: github-actions directory: "/" schedule: interval: daily time: "03:00" + reviewers: + - neuro-inc/mlops open-pull-requests-limit: 10 +- package-ecosystem: pip + directory: "/" + schedule: + interval: daily + reviewers: + - neuro-inc/mlops + allow: + - dependency-type: "all" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5629f58f..12bc4788 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,14 +1,20 @@ name: Continuous Integration on: - pull_request: - release: - types: [published] push: branches: [master] + tags: [v*.*.*] + pull_request: + branches: [master] + pull_request_target: + branches: [master] jobs: build: + if: | + (github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') || + (github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]') + env: DOCKER_SERVER: docker.io DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} @@ -23,6 +29,8 @@ jobs: steps: - name: Checkout commit uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} - name: Install python uses: actions/setup-python@v2 @@ -33,7 +41,7 @@ jobs: run: | python -m venv venv source venv/bin/activate - pip install -U neuro-cli packaging neuro-sdk + pip install -U neuro-cli - name: Configure environment run: | diff --git a/requirements/neuro.txt b/requirements/neuro.txt new file mode 100644 index 00000000..f5b66e0a --- /dev/null +++ b/requirements/neuro.txt @@ -0,0 +1,3 @@ +neuro-cli==21.7.29 +neuro-flow==21.7.9 +neuro-extras==21.7.23 diff --git a/targets/python37-jupyter-pytorch-tensorflow-jupyterlab/Dockerfile b/targets/python37-jupyter-pytorch-tensorflow-jupyterlab/Dockerfile index ee9a44bb..8d3024a0 100644 --- a/targets/python37-jupyter-pytorch-tensorflow-jupyterlab/Dockerfile +++ b/targets/python37-jupyter-pytorch-tensorflow-jupyterlab/Dockerfile @@ -120,17 +120,6 @@ RUN APT_INSTALL="apt-get install -y --no-install-recommends" && \ tensorboardX \ && \ -# ================================================================== -# neuromation -# ------------------------------------------------------------------ - - $PIP_INSTALL \ - neuro-cli==21.6.3 \ - neuro-flow==21.6.2 \ - neuro-extras==21.3.19 \ - packaging \ - && \ - # ================================================================== # wandb # ------------------------------------------------------------------ @@ -237,6 +226,12 @@ PermitEmptyPasswords yes\n" > /etc/ssh/sshd_config # ssh port EXPOSE 22 +# ================================================================== +# Neu.ro packages +# ------------------------------------------------------------------ +COPY requirements/neuro.txt /tmp/neuro.txt +RUN python -m pip --no-cache-dir install --upgrade -r /tmp/neuro.txt && \ + rm /tmp/neuro.txt # ================================================================== # config & cleanup # ------------------------------------------------------------------