Skip to content

Commit

Permalink
Replace micromamba with native Python venv
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Nov 8, 2023
1 parent 273b388 commit 593c448
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ jobs:

- name: Integration tests
# Unfortunate workaround required until we have better test/settings isolation
run: pytest --cov=jobflow_remote --cov-report=xml tests/integration
run: pytest -vv tests/integration
10 changes: 4 additions & 6 deletions tests/integration/dockerfiles/Dockerfile.slurm
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ WORKDIR /home/${USERNAME}
USER ${USERNAME}
SHELL ["/bin/bash", "--login", "-c"]

# Install micromamba to manage Python environments
RUN curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
RUN micromamba shell init --shell bash --root-prefix ~/micromamba
RUN micromamba create --yes -n jobflow python=3.10 -c conda-forge

# Install jobflow from directory, assuming container
# is built at the root of the jobflow repo
RUN mkdir jobflow-remote
Expand All @@ -46,9 +41,12 @@ USER root
RUN sudo chmod -R 0777 jobflow-remote
USER ${USERNAME}

# Install jobflow in a local native virtualenv
WORKDIR /home/${USERNAME}/jobflow-remote
RUN git config --global --add safe.directory /home/${USERNAME}/jobflow-remote
RUN micromamba run -n jobflow pip install -e .
RUN python3 -m venv /home/${USERNAME}/.venv
RUN /home/${USERNAME}/.venv/bin/pip install -U pip
RUN /home/${USERNAME}/.venv/bin/pip install --verbose -e .

# Make a job directory for jobflow
WORKDIR /home/${USERNAME}
Expand Down

0 comments on commit 593c448

Please sign in to comment.