diff --git a/containers/gsas/Containerfile-conda b/containers/gsas/Containerfile-conda new file mode 100644 index 0000000..13605da --- /dev/null +++ b/containers/gsas/Containerfile-conda @@ -0,0 +1,49 @@ +FROM fedora + +RUN dnf install -y wget \ + bzip2 \ + subversion \ + libXxf86vm \ + mesa-libGL \ + mesa-libGLU +RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh + +RUN bash /tmp/miniconda.sh -b -p /opt/miniconda + +ENV PATH="/opt/miniconda/bin:$PATH" +ENV g2home=/GSASII + +RUN conda create -n GSASII python=3.10 \ + wxpython=4.2 \ + numpy=1.23 \ + scipy matplotlib \ + pyopengl \ + pillow \ + h5py \ + imageio \ + conda \ + subversion \ + requests \ + bluesky \ + -c conda-forge -y + +RUN mkdir -p ${g2home} +WORKDIR ${g2home} +RUN svn export https://subversion.xray.aps.anl.gov/pyGSAS/install/bootstrap.py $g2home +RUN conda run -n GSASII python bootstrap.py +RUN conda init + +RUN conda run -n GSASII python -m pip install 'bluesky-adaptive[all]' +RUN conda run -n GSASII python -m pip install nslsii + +RUN mkdir -p /src/pdf-agents +COPY pdf_agents /src/pdf-agents/pdf_agents + +ENV PYTHONPATH=${g2home}/GSASII:/src/pdf-agents:$PYTHONPATH + +# Cleanup +RUN dnf clean all\ + && rm -rf /var/lib/apt/lists/* \ + && rm -rf /root/.cache/pip/* \ + && rm -rf /tmp/* +RUN conda run -n GSASII conda clean -y --all diff --git a/containers/gsas/README.md b/containers/gsas/README.md new file mode 100644 index 0000000..68ebb69 --- /dev/null +++ b/containers/gsas/README.md @@ -0,0 +1,14 @@ +# GSAS Image + +Fedora based image that contains gsas, python3, bluesky, and bluesky-adaptive. +Primarily for gsas agent. + +We had to use the conda install because the pure Fedora and Ubuntu image ran into issues with the GSASII install from pip and package managers. + + +```bash +cd /path/to/pdf-agents +curl https://subversion.xray.aps.anl.gov/admin_pyGSAS/downloads/gsas2full-Latest-Linux-x86_64.sh > ./containers/gsas/gsas2full-Latest-Linux-x86_64.sh +podman build --platform linux/amd64 -t gsas:conda -f containers/gsas/Containerfile-conda . +podman run -it --rm gsas:conda conda run -n GSASII --no-capture-output ipython +```