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

Add Python 3.11-based image #20

Closed
wants to merge 1 commit 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
39 changes: 39 additions & 0 deletions py311/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM condaforge/mambaforge:22.9.0-2@sha256:a508942c46f370f2bebd94801d6094d0d5be77c4f36ad0edd608b118998fbca8 as install

LABEL org.opencontainers.image.authors="Shiv Upadhyay <shivnupadhyay@gmail.com>, Eric Berquist <eric.berquist@gmail.com>"

SHELL ["/bin/bash", "-l", "-i", "-c"]
ENV SHELL /bin/bash

ENV HOME /root
WORKDIR "$HOME"

COPY ./condarc "$HOME"/.condarc
COPY ./environment.yml .

RUN mamba info -a
RUN --mount=type=cache,target=/opt/conda/pkgs mamba env create --file="$HOME"/environment.yml --name=cclib

RUN apt-get update && \
apt-get install -y -qq --no-install-recommends \
build-essential \
curl \
gcc \
git \
swig \
&& rm -rf /var/lib/apt/lists/*
RUN mamba init && \
echo "mamba activate cclib" >> "$HOME"/.bashrc && \
curl -o requirements.txt \
https://raw.githubusercontent.com/cclib/cclib/master/requirements.txt && \
mamba run -n cclib python -m pip install --no-cache-dir -r requirements.txt

FROM install as test

SHELL ["/bin/bash", "-l", "-i", "-c"]
WORKDIR "$HOME"
RUN git clone https://github.com/cclib/cclib.git
WORKDIR "$HOME"/cclib
COPY test.bash .
RUN ./test.bash
WORKDIR "$HOME"
7 changes: 7 additions & 0 deletions py311/condarc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# -*- mode: yaml -*-
always_yes: true
changeps1: false
channel_priority: flexible
quiet: false
report_errors: true
verbosity: 1
17 changes: 17 additions & 0 deletions py311/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
channels:
- psi4
- conda-forge
- defaults
dependencies:
- cython # only needed for pyquante2
- h5py
- openbabel
- pip
- psi4
- pytest-cov
- pytest-shutil
- python=3.11
- pip:
- pyscf
- qc-iodata
9 changes: 9 additions & 0 deletions py311/test.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env -S bash --login

set -euo pipefail
set -x

bash ./.github/scripts/run_pytest.bash
bash ./.github/scripts/run_pytest_methods.bash

set +x
Loading