Skip to content

Commit

Permalink
Update container installation scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaweiZhuang committed Dec 10, 2018
1 parent bb74bec commit 72019f8
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 3 deletions.
4 changes: 3 additions & 1 deletion scripts/build_environment/Container/README
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
For installing the container software itself, not building images.
Scripts to install the container software itself, not building images.

See Dockerfiles at https://github.com/geoschem/geos-chem-docker
7 changes: 7 additions & 0 deletions scripts/build_environment/Container/install_docker_alinux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# /bin/bash
# https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html

sudo yum update -y
sudo amazon-linux-extras install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash
# Install Docker-CE on AWS Ubuntu VM
# https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository
# This is useful for building CharlieCloud images

sudo apt-get update

Expand All @@ -27,5 +26,5 @@ sudo docker run --rm hello-world

sudo usermod -aG docker $USER # re-login, no need to use `sudo` before docker commands

# for CharlieCloud
# additional dependency for CharlieCloud
sudo apt-get install -y gcc make python
38 changes: 38 additions & 0 deletions scripts/build_environment/Container/install_singularity_alinux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
# https://www.sylabs.io/guides/3.0/user-guide/installation.html#installation

# Dependencies
sudo yum update -y && \
sudo yum groupinstall -y 'Development Tools' && \
sudo yum install -y \
openssl-devel \
libuuid-devel \
libseccomp-devel \
wget \
squashfs-tools

export VERSION=1.11 OS=linux ARCH=amd64 && \
wget https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz && \
sudo tar -C /usr/local -xzvf go$VERSION.$OS-$ARCH.tar.gz && \
rm go$VERSION.$OS-$ARCH.tar.gz

echo 'export GOPATH=${HOME}/go' >> ~/.bashrc && \
echo 'export PATH=/usr/local/go/bin:${PATH}:${GOPATH}/bin' >> ~/.bashrc && \
. ~/.bashrc


go get -u github.com/golang/dep/cmd/dep

# Install singularity from source
go get -d github.com/sylabs/singularity

export VERSION=v3.0.1 # or another tag or branch if you like && \
cd $GOPATH/src/github.com/sylabs/singularity && \
git fetch && \
git checkout $VERSION # omit this command to install the latest bleeding edge code from master

./mconfig && \
make -C ./builddir && \
sudo make -C ./builddir install

echo '. /usr/local/etc/bash_completion.d/singularity' >> ~/.bashrc

0 comments on commit 72019f8

Please sign in to comment.