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

update recipes for EESSI client containers for 2020.10 pilot #46

Merged
merged 4 commits into from
Oct 30, 2020
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/test-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Build the Docker image
run: docker build . --file containers/Dockerfile.EESSI-client-pilot-centos7
run: docker build . --file containers/Dockerfile.EESSI-client-pilot-centos7-x86_64
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM docker.io/arm64v8/centos:7
RUN yum install -y http://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs-release-latest.noarch.rpm \
&& yum install -y cvmfs cvmfs-fuse3 --nogpgcheck \
&& yum install -y cvmfs-config-default sudo vim openssh-clients \
&& yum install -y https://github.com/EESSI/filesystem-layer/releases/download/v0.2.1/cvmfs-config-eessi-0.2.1-1.noarch.rpm
&& yum install -y https://github.com/EESSI/filesystem-layer/releases/download/v0.2.3/cvmfs-config-eessi-0.2.3-1.noarch.rpm

RUN echo 'CVMFS_QUOTA_LIMIT=10000' > /etc/cvmfs/default.local \
&& echo 'CVMFS_HTTP_PROXY="DIRECT"' >> /etc/cvmfs/default.local
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM docker.io/library/centos:7.8.2003

RUN yum install -y http://cvmrepo.web.cern.ch/cvmrepo/yum/cvmfs-release-latest.noarch.rpm \
&& yum install -y cvmfs cvmfs-config-default cvmfs-fuse3 sudo vim openssh-clients \
&& yum install -y https://github.com/EESSI/filesystem-layer/releases/download/v0.2.1/cvmfs-config-eessi-0.2.1-1.noarch.rpm
&& yum install -y https://github.com/EESSI/filesystem-layer/releases/download/v0.2.3/cvmfs-config-eessi-0.2.3-1.noarch.rpm

RUN echo 'CVMFS_QUOTA_LIMIT=10000' > /etc/cvmfs/default.local \
&& echo 'CVMFS_HTTP_PROXY="DIRECT"' >> /etc/cvmfs/default.local
Expand Down
18 changes: 8 additions & 10 deletions containers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,24 @@ This directory contains recipes for containers that are useful in the scope of t
Container to provide easy access to EESSI pilot repository,
see https://hub.docker.com/repository/docker/eessi/client-pilot and https://eessi.github.io/docs/pilot.

### Build container
### Build container + push to Docker Hub

```shell
export EESSI_PILOT_VERSION=2020.09
docker build --no-cache -f Dockerfile.EESSI-client-pilot-centos7 -t eessi/client-pilot:centos7-${EESSI_PILOT_VERSION} .
```

### Push to Docker Hub (requires credentials)
Note: the `docker push` part of the script assumes your Docker Hub creditionals are known
(can be done via `docker login docker.io`, for example).

```
docker push eessi/client-pilot:centos7-${EESSI_PILOT_VERSION}
```shell
export EESSI_PILOT_VERSION=2020.10
./docker_build_push.sh ${EESSI_PILOT_VERSION}
```

### Run (using Singularity)

```
export EESSI_PILOT_VERSION=2020.10
mkdir -p /tmp/$USER/{var-lib-cvmfs,var-run-cvmfs,home}
export SINGULARITY_BIND="/tmp/$USER/var-run-cvmfs:/var/run/cvmfs,/tmp/$USER/var-lib-cvmfs:/var/lib/cvmfs"
export SINGULARITY_HOME="/tmp/$USER/home:/home/$USER"
export EESSI_CONFIG="container:cvmfs2 cvmfs-config.eessi-hpc.org /cvmfs/cvmfs-config.eessi-hpc.org"
export EESSI_PILOT="container:cvmfs2 pilot.eessi-hpc.org /cvmfs/pilot.eessi-hpc.org"
singularity shell --fusemount "$EESSI_CONFIG" --fusemount "$EESSI_PILOT" docker://eessi/client-pilot:centos7-${EESSI_PILOT_VERSION}
singularity shell --fusemount "$EESSI_CONFIG" --fusemount "$EESSI_PILOT" docker://eessi/client-pilot:centos7-$(uname -m)-${EESSI_PILOT_VERSION}
```
15 changes: 15 additions & 0 deletions containers/docker_build_push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

if [ $# -ne 1 ]; then
echo "ERROR: Usage: $0 <EESSI pilot version> (for example: $0 2020.10)" >&2
exit 1
fi
eessi_pilot_version=$1

os="centos7"
cpu_arch=$(uname -m)
tag="eessi/client-pilot:${os}-${cpu_arch}-${eessi_pilot_version}"

docker build --no-cache -f Dockerfile.EESSI-client-pilot-${os}-${cpu_arch} -t ${tag} .

docker push ${tag}