-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add GSAS image and instructions.
- Loading branch information
1 parent
da59622
commit 088cef6
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` |