Skip to content

Commit

Permalink
feat: update dockerfile (#12)
Browse files Browse the repository at this point in the history
* update conda env

* feat: create separate env for toolz

* update ci

* refactor: update Dockerfile

* update env

* update ci
  • Loading branch information
balajtimate authored Oct 16, 2023
1 parent 1992dfa commit 188e429
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 29 deletions.
File renamed without changes.
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ jobs:
shell: bash -l {0}

steps:
- name: check out repository
- name: Check out repository
uses: actions/checkout@v4

- 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
Expand All @@ -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 }}
Expand All @@ -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/[email protected]
with:
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
CMD ["transcript-sampler", "-v"]
2 changes: 1 addition & 1 deletion environment-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: scrnasim
name: scrnasim-toolz
channels:
- conda-forge
- bioconda
Expand Down
3 changes: 1 addition & 2 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: scrnasim
name: scrnasim-toolz
channels:
- conda-forge
- bioconda
Expand All @@ -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
Expand Down
6 changes: 0 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 188e429

Please sign in to comment.