Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to micromamba image #16

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 5 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,15 @@ jobs:
- uses: actions/checkout@v2

- name: Conda setup
uses: s-weigand/setup-conda@v1
uses: mamba-org/provision-with-micromamba@main
with:
update-conda: true
cache-env: true
micromamba-version: 0.23.0
environment-name: suprashare

# cache the conda installation to speedup CI runs
- uses: actions/cache@v2
id: cache
with:
path: /usr/share/miniconda/envs/suprashare
key: ${{ runner.os }}-conda-cache-${{ hashFiles('environment.yml') }}

- name: Conda environment creation
if: steps.cache.outputs.cache-hit != 'true'
run: |
conda env create -f environment.yml
source activate suprashare
- name: Run tests
shell: bash -l {0}
run: |
source activate suprashare
pytest -v


Expand Down
11 changes: 4 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
FROM continuumio/miniconda3
FROM mambaorg/micromamba:0.23.0

RUN conda update conda
COPY environment.yml .
RUN conda env create -f environment.yml

# Make RUN commands use the new env
SHELL ["conda", "run", "-n", "suprashare", "/bin/bash", "-c"]
COPY --chown=$MAMBA_USER:$MAMBA_USER environment.yml /tmp/environment.yml
RUN micromamba install -y -f /tmp/environment.yml && \
micromamba clean --all --yes

COPY . ./

Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: suprashare
name: base
channels:
- conda-forge
dependencies:
Expand Down