From 188e429e094d139bb460f7e60c81b71bbd13cfb3 Mon Sep 17 00:00:00 2001 From: balajtimate <51365402+balajtimate@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:44:32 +0200 Subject: [PATCH] feat: update dockerfile (#12) * update conda env * feat: create separate env for toolz * update ci * refactor: update Dockerfile * update env * update ci --- .../pull_request_template.md | 0 .github/workflows/ci.yml | 32 +++++++++---------- Dockerfile | 7 ++-- environment-dev.yml | 2 +- environment.yml | 3 +- requirements.txt | 6 ---- 6 files changed, 21 insertions(+), 29 deletions(-) rename pull_request_template.md => .github/pull_request_template.md (100%) diff --git a/pull_request_template.md b/.github/pull_request_template.md similarity index 100% rename from pull_request_template.md rename to .github/pull_request_template.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4dbe371..90d4a4d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: shell: bash -l {0} steps: - - name: check out repository + - name: Check out repository uses: actions/checkout@v4 - name: Setup Conda/Mamba @@ -25,14 +25,14 @@ jobs: with: mamba-version: "*" auto-update-conda: true - activate-environment: scrnasim + activate-environment: scrnasim-toolz environment-file: environment.yml auto-activate-base: false - - name: Update scrnasim env with dev packages - run: mamba env update -n scrnasim -f environment-dev.yml + - name: Update scrnasim-toolz env with dev packages + run: mamba env update -n scrnasim-toolz -f environment-dev.yml - - name: display environment info + - name: Display environment info run: | conda info -a conda list @@ -54,32 +54,32 @@ jobs: steps: - - name: checkout repository + - name: Checkout repository uses: actions/checkout@v4 - - name: setup Conda/Mamba + - name: Setup Conda/Mamba uses: conda-incubator/setup-miniconda@v2 with: mamba-version: "*" auto-update-conda: true - activate-environment: scrnasim + activate-environment: scrnasim-toolz environment-file: environment.yml auto-activate-base: false - - name: update scrnasim env with dev packages - run: mamba env update -n scrnasim -f environment-dev.yml + - name: Update scrnasim-toolz env with dev packages + run: mamba env update -n scrnasim-toolz -f environment-dev.yml - - name: display environment info + - name: Display environment info run: | conda info -a conda list - - name: run unit tests + - name: Run unit tests run: | coverage run --source scRNAsim_toolz -m pytest coverage xml - - name: submit coverage report + - name: Submit coverage report uses: codecov/codecov-action@v2 with: token: ${{ secrets.CODECOV_TOKEN }} @@ -96,14 +96,14 @@ jobs: steps: - - name: check out repository + - name: Check out repository uses: actions/checkout@v4 - - name: generate tag + - name: Generate tag run: | echo "TAG=$(date '+%Y%m%d')" >> $GITHUB_ENV - - name: build and publish image + - name: Build and publish image id: docker uses: philips-software/docker-ci-scripts@v5.1.0 with: diff --git a/Dockerfile b/Dockerfile index 682bfbc..2ba76c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -31,9 +31,8 @@ RUN groupadd -r ${GROUP} && useradd --no-log-init -r -g ${GROUP} ${USER} WORKDIR ${WORKDIR} RUN chown -R ${USER}:${GROUP} ${WORKDIR} && chmod 700 ${WORKDIR} USER ${USER} -RUN echo "source activate scrnasim" > ~/.bashrc -ENV PATH /opt/conda/envs/scrnasim/bin:$PATH +RUN echo "source activate scrnasim-toolz" > ~/.bashrc +ENV PATH /opt/conda/envs/scrnasim-toolz/bin:$PATH # SET ENTRYPOINT -ENTRYPOINT ["transcript-sampler"] -CMD ["-v"] \ No newline at end of file +CMD ["transcript-sampler", "-v"] \ No newline at end of file diff --git a/environment-dev.yml b/environment-dev.yml index 0206f25..b1cd936 100644 --- a/environment-dev.yml +++ b/environment-dev.yml @@ -1,4 +1,4 @@ -name: scrnasim +name: scrnasim-toolz channels: - conda-forge - bioconda diff --git a/environment.yml b/environment.yml index 576a543..9fde210 100644 --- a/environment.yml +++ b/environment.yml @@ -1,4 +1,4 @@ -name: scrnasim +name: scrnasim-toolz channels: - conda-forge - bioconda @@ -8,7 +8,6 @@ dependencies: - polars==0.16.17 - gtfparse - numpy>=1.23.3 - - nextflow - pandas>=1.4.4 - python>=3.6, <=3.10 - pyarrow diff --git a/requirements.txt b/requirements.txt index 92c62c1..56363d7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,2 @@ -biopython>=1.78 -numpy>=1.23.3 -pandas>=1.4.4 -polars==0.16.17 -gtfparse setuptools -pyarrow cli_test_helpers