diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml index 0dbcd09..6b70af9 100644 --- a/.github/workflows/github-ci.yml +++ b/.github/workflows/github-ci.yml @@ -12,17 +12,19 @@ jobs: build-linux: runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} steps: - uses: actions/checkout@v2 - - name: Add conda to system path - run: | - # $CONDA is an environment variable pointing to the root of the miniconda directory - echo $CONDA/bin >> $GITHUB_PATH - - name: Install dependencies & package - run: | - conda env update --file environment.yml --name base - pip install . + - name: create environment with mamba + uses: conda-incubator/setup-miniconda@v2 + with: + miniconda-version: 22.11.1 + auto-activate-base: false + activate-environment: pacpac + environment-file: environment.yml - name: Lint with flake8 run: | conda install flake8 diff --git a/Dockerfile b/Dockerfile index 7ea7e6f..d20e7ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM frolvlad/alpine-miniconda3 as build +FROM frolvlad/alpine-miniconda3:python3.7 as build WORKDIR pacpac COPY environment.yml setup.py ./ @@ -14,7 +14,7 @@ ENV PATH /opt/conda/envs/pacpac/bin:$PATH RUN pip install . ########## conda-pack bit to reduce image size -RUN conda install conda-pack +RUN conda install conda-pack==0.6.0 # Use conda-pack to create a standalone enviornment in /venv RUN conda-pack -n pacpac -o /tmp/env.tar && \ @@ -25,7 +25,7 @@ RUN conda-pack -n pacpac -o /tmp/env.tar && \ RUN /venv/bin/conda-unpack ########## -FROM debian:buster AS runtime +FROM debian:buster-20230919 AS runtime # Copy /venv from the previous stage COPY --from=build /venv /venv diff --git a/environment.yml b/environment.yml index 3a65fb8..0a3736a 100755 --- a/environment.yml +++ b/environment.yml @@ -16,4 +16,4 @@ dependencies: - pandarallel==1.5.2 - pyfiglet==0.8.post1 - typer==0.3.2 - - protobuf==3.20 + - protobuf==3.20 \ No newline at end of file