Skip to content

Commit

Permalink
clean action and fix mamba link
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxiBoether committed Sep 18, 2023
1 parent c1e426b commit c525f06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 39 deletions.
39 changes: 1 addition & 38 deletions .github/actions/mamba/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,13 @@ runs:
with:
python-version: '3.10'

# - name: Check if shared miniconda installation exists (we are on a Github Runner)
# id: check_files
# uses: andstor/file-existence-action@v2
# with:
# files: "/usr/share/miniconda/envs"

# - name: Set shared conda path
# if: steps.check_files.outputs.files_exists == 'true'
# run: echo "CONDAPATH=/usr/share/miniconda/envs" >> $GITHUB_ENV
# shell: bash

# - name: Miniconda exists, fix permissions
# if: steps.check_files.outputs.files_exists == 'true'
# run: sudo chown -R $(whoami):$(id -ng) ${CONDAPATH}
# shell: bash

# - name: Set custom conda path
# if: steps.check_files.outputs.files_exists == 'false'
# run: echo "CONDAPATH=${CONDA}" >> $GITHUB_ENV
# shell: bash

- name: Set cache date
run: echo "DATE=$(date +'%Y%m%d')" >> $GITHUB_ENV
shell: bash

# increase to reset cache manually
- name: Set cache number
run: echo "CACHE_NUMBER=0" >> $GITHUB_ENV
run: echo "CACHE_NUMBER=1" >> $GITHUB_ENV
shell: bash

- name: Setup micromamba
Expand All @@ -44,22 +23,6 @@ runs:
cache-downloads-key: downloads-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
init-shell: bash

# - uses: actions/cache@v3
# with:
# path: ${{ env.CONDAPATH }}
# key: conda-${{ hashFiles('environment.yml') }}-${{ env.DATE }}-${{ env.CACHE_NUMBER }}
# id: cache

# - name: Setup requirements
# run: |
# mamba update -n base -c defaults mamba
# mamba update --all
# mamba env create -f ./environment.yml
# mamba run -n modyn pip install -e .
# mamba run -n modyn pip install -r dev-requirements.txt
# if: steps.cache.outputs.cache-hit != 'true'
# shell: bash

- name: Install dev requirements
run: |
micromamba run -n modyn pip install -e .
Expand Down
2 changes: 1 addition & 1 deletion docker/Dependencies/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ENV PATH="${PATH}:/home/appuser/.local/bin"

# Install mamba
ENV CONDA_DIR /opt/mamba
RUN wget "https://github.com/mamba-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh" -O ~/mamba.sh && \
RUN wget "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh" -O ~/mamba.sh && \
/bin/bash ~/mamba.sh -b -p /opt/mamba
ENV PATH=$CONDA_DIR/bin:$PATH
RUN mamba update -n base -c defaults mamba && mamba update --all && mamba init bash
Expand Down

0 comments on commit c525f06

Please sign in to comment.