Skip to content

Commit

Permalink
Adds a publishable dockerfile (DOI-USGS#4098)
Browse files Browse the repository at this point in the history
* Adds a publishable dockerfile

* Updates README with docker data instructions
  • Loading branch information
evindunn authored Feb 25, 2021
1 parent 3812ae2 commit 4dee720
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,38 @@ This installation guide is for ISIS users interested in installing ISIS (3.6.0)+
for Anaconda 3.4 and up - conda activate isis
prior to Anaconda 3.4 - source activate isis

### Installation with Docker
The ISIS production Dockerfile automates the conda installation process above.
You can either build the Dockerfile yourself or use the
[usgsastro/isis](https://hub.docker.com/repository/docker/usgsastro/isis)
image from DockerHub.

#### To build the Dockerfile
1. Download [the production Docker file](./docker/production.dockerfile)
2. Build the Dockerfile
```
docker build -t isis -f production.dockerfile .
```
3. Run the Dockerfile
```
docker run -it isis bash
```

#### Run run the prebuilt image
```
docker run -it usgsastro/isis bash
```

#### Usage with the ISIS data area
Usually you'll want to mount an external directory containing the ISIS data.
The data is not included in the Docker image.

```
docker run -v /my/data/dir:/opt/conda/data -v /my/testdata/dir:/opt/conda/testData -it usgsastro/isis bash
```

Then [download the data](#the-isis-data-area) into /my/data/dir to make it accessible inside your
container.

### Practical Usage with other conda packages

Expand Down
17 changes: 17 additions & 0 deletions docker/production.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# vim: ft=dockerfile:

FROM usgsastro/miniconda3

RUN conda update conda && \
conda install python=3.6 && \
conda config --add channels conda-forge && \
conda config --add channels usgs-astrogeology

RUN conda install -c usgs-astrogeology isis

RUN apt-get update && \
apt-get install libgl1 -y && \
rm -rf /var/lib/apt/lists/*

RUN bash -lc 'python "$CONDA_PREFIX/scripts/isisVarInit.py"'

0 comments on commit 4dee720

Please sign in to comment.