diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 3761a1f3..26e26048 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -7,8 +7,8 @@ name: Docker # Dockerfile is still valid. # To be able to push to the GitHub Container Registry, this expects the following # secrets to be set in the project: -# - GITHUB_USERNAME : username that write push packages to the moleculemaker GitHub org -# - GITHUB_PASSWORD : PAT associated with the username +# - GH_USERNAME : username that write push packages to the moleculemaker GitHub org +# - GH_PASSWORD : PAT associated with the username on: push: branches: @@ -59,8 +59,8 @@ jobs: uses: docker/login-action@v2 with: registry: ghcr.io - username: ${{ secrets.GITHUB_USERNAME }} - password: ${{ secrets.GITHUB_PASSWORD }} + username: ${{ secrets.GH_USERNAME }} + password: ${{ secrets.GH_PASSWORD }} - name: Build and push diff --git a/Dockerfile b/Dockerfile index 11a5f1a0..977adbae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Start with miniconda3 based on debian:bullseye -FROM continuumio/miniconda3 +FROM condaforge/mambaforge WORKDIR / # Install essential build tools @@ -8,16 +8,22 @@ RUN apt-get -qq update && \ rm -rf /var/cache/apt/archives /var/lib/apt/lists/* # Configure conda base environment -RUN conda config --add channels conda-forge -RUN conda install conda-build conda-verify -n base +RUN mamba init bash +RUN mamba install boa -n base && mamba clean -afy # Copy source code into the container image COPY . /molli/ # Use conda to build provided conda-recipe -RUN conda build molli/ +RUN mamba mambabuild --python=3.11 molli/ && mamba clean -afy -# Install the molli executable -RUN conda install molli -c local +# Create + activate a new environment for Python 11 +RUN mamba create -y -n molli python=3.11 && mamba clean -afy +RUN echo "mamba activate molli" >> ~/.bashrc +SHELL ["/bin/bash", "--login", "-c"] + +# Install the molli package in the new environment +RUN mamba install molli -c local -n molli -y +RUN mamba install --file /molli/optional-deps.txt -y -n molli && mamba clean -afy ENTRYPOINT ["molli"] diff --git a/optional-deps.txt b/optional-deps.txt new file mode 100644 index 00000000..0c40eda8 --- /dev/null +++ b/optional-deps.txt @@ -0,0 +1,6 @@ +notebook +py3dmol +openbabel +rdkit +scikit-learn +pandas