Command Log: June 5, 2024, 12:09 pm
ls
cay Dockerfile
cat Dockerfile
cat Dockerfile
docker container run alpine-python:latest 741 568
docker container run alpine-python:latest
docker container run --entrypoint=sh -it alpine-python:latest
docker container run --entrypoint=cat /etc/os-release -it alpine-python:latest
docker container run --entrypoint="cat /etc/os-release" -it alpine-python:latest
docker container run --entrypoint="cat /etc/os-release" -it alpine-python:latest
clear
# Adding sum.py to $PATH
nano Dockerfile
cat sum.py
whereis python3
echo $PATH
whereis cat
whereis cat
whereis cat
# Build image with new tag
docker image build -t alpine-python:v2 -f Dockerfile .
docker image build -t alpine-python:v2 -f Dockerfile .
nano Dockerfile
docker image build -t alpine-python:v2 -f Dockerfile .
docker container run alpine-python:v2 8 5 7
docker container run alpine-python:v2 8 5 7
# Remove Entrypoint to require specifying a script
nano Dockerfile
nano Dockerfile
nano Dockerfile
nano Dockerfile
docker image build -t alpine-python:v3 -f Dockerfile .
docker container run alpine-python:v3 8 5 7
docker container run alpine-python:v3 sum.py
cd
ls
docker container run alpine-python:v3 sum.py
docker container run alpine-python:v3 whereis sum.py
docker container run -it alpine-python:v3 sh
ls /home
docker image ls
docker image ls
docker image save alpine-python:v3 -o alpine-python.v3.tar
ls
ls -lah
gzip alpine-python.v3.tar
ls -lah
ls -lah
# Delete old v3 and import from tar.gz
docker image rm alpine-python:v3
docker container rm 80b
docker image rm alpine-python:v3
docker container prune
docker image rm alpine-python:v3
docker image ls | grep alpine
docker container run alpine-python:v3 sum.py
docker container run alpine-python:v3 sum.py
# load image from tar gz
docker load --input alpine-python.v3.tar.gz
docker container run alpine-python:v3 sum.py
docker image ls | grep alpine
docker image ls | grep alpine
docker container prune
docker image rm alpine-python:v3
docker image ls
docker image ls | grep alphine
docker image ls | grep alpine
docker container run alpine-python:v3 sum.py
docker load --input alpine-python.v3.tar.gz
docker container run alpine-python:v3 sum.py
cd
pwd
ls
rm -rf test/
# Start of Apptainer
clear
mkdir test
cd test
apptainer pull hello-world.sif shub://vsoch/hello-world
ls
ls -lah
apptainer run hello-world.sif
apptainer inspect -r hello-world.sif
rm hello-world.sif
apptainer cache list
apptainer cache list -v
apptainer cache clean
apptainer cache clean --dry-run
apptainer cache clean
ls ~/.apptainer/cache/
ls ~/.apptainer/cache/
ls ~/.apptainer/cache/
apptainer pull hello-world.sif shub://vsoch/hello-world
apptainer pull hello-world.sif shub://vsoch/hello-world
apptainer run hello-world.sif cat /etc/os-release
apptainer exec hello-world.sif cat /etc/os-release
cat /etc/os-release
apptainer inspect -r hello-world.sif
apptainer exec hello-world.sif cat /rawr.sh
apptainer exec hello-world.sif echo "Hello World!"
apptainer exec hello-world.sif ls
apptainer exec hello-world.sif ls /
apptainer exec hello-world.sif ls whoami
apptainer exec hello-world.sif whoami
apptainer exec hello-world.sif whoami
# Run interactive shell in container
apptainer shell hello-world.sif
docker container run -it alpine-python:v3 sh
apptainer exec hello-world.sif
apptainer inspect -r hello-world.sif
apptainer exec hello-world.sif apt update
apptainer exec hello-world.sif date
apptainer run hello-world.sif
apptainer run hello-world.sif ls
apptainer exec hello-world.sif docker
apptainer exec hello-world.sif docker
# https://hcc.unl.edu/docs/applications/user_software/using_apptainer/
apptainer shell -B /tmp:/pineapple hello-world.sif
apptainer shell -B /tmp:/pineapple hello-world.sif
ls /tmp
ls /tmp
git clone https://github.com/unlhcc/job-examples.git
cd /etc/
pwd
apptainer shell -B /home/ubuntu/test/job-examples:/input /home/ubuntu/test/hello-world.sif
apptainer shell -B /home/ubuntu/test/job-examples:/input /home/ubuntu/test/hello-world.sif
clear
# Running Docker Images in Apptainer! Yay!
# Running Docker Images in Apptainer! Yay!
cd
cd test/
apptainer pull python3.12.3-bookworm.sif docker://python:3.12.3-bookworm
apptainer pull python3alpine.sif docker://python:3.12-alpine3.20
ls
apptainer run python3.12.3-bookworm.sif
apptainer inspect -r python3.12.3-bookworm.sif
apptainer inspect -r python3.12.3-bookworm.sif
# Run a shell inside a python "Docker" image based container
apptainer shell python3.12.3-bookworm.sif
apptainer exec python3alpine.sif sh
clear
# Building apptainer images from scratch
nano my-python3.def
apptainer build my-python3.sif my-python3.def
apptainer build my-python3.sif my-python3.def
apptainer run my-python3.sif
nano my-python3.def
apptainer build my-python3.sif my-python3.def
ls
scp my-python3.sif hccdemo@swan.unl.edu:/work/demo/hccdemo/
scp my-python3.sif hccdemo@swan.unl.edu:/work/demo/hccdemo/
scp my-python3.sif hccdemo@swan.unl.edu:/work/demo/hccdemo/
scp my-python3.sif hccdemo@swan.unl.edu:/work/demo/hccdemo/
scp my-python3.sif hccdemo@swan.unl.edu:/work/demo/hccdemo/
cd
pwd
# Building OSU Benchmarks
wget https://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-7.4.tar.gz
wget https://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-7.4.tar.gz
wget https://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-7.4.tar.gz
wget https://mvapich.cse.ohio-state.edu/download/mvapich/osu-micro-benchmarks-7.4.tar.gz
nano osu-benchmark.def
apptainer build osu-benchmark_062024.sif osu-benchmark.def
nano osu-benchmark.def
apptainer build osu-benchmark_062024.sif osu-benchmark.def
git clone https://github.com/cbohn4/HCC_OSU_Example.git
cd HCC_OSU_Example/
ls
cd docker_example/
ls
nano Dockerfile
docker build -t osu-docker:latest -f Dockerfile .
cp ~/osu-micro-benchmarks-7.4.tar.gz ./
docker build -t osu-docker:latest -f Dockerfile .
cat entrypoint.sh
nano Dockerfile
docker build -t osu-docker:v1 -f Dockerfile .
docker tag osu-docker:latest cbohn/osu-docker:latest
docker push cbohn/osu-docker:latest
cd
ls
scp osu-benchmark_062024.sif hccdemo@swan.unl.edu:/work/demo/hccdemo/
scp osu-benchmark_062024.sif hccdemo@swan.unl.edu:/work/demo/hccdemo/
docker image ls | grep cbohn