Skip to content

Commit

Permalink
chore: docker helper scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
JuanPedroGHM committed Jul 13, 2023
1 parent db8ad75 commit 9826dfa
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 30 deletions.
File renamed without changes.
22 changes: 22 additions & 0 deletions docker/scripts/install_print_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
# Scripts to quickly obtain all relevant information out of a new nvidia pytorch container.

# Container setup
apt update && DEBIAN_FRONTEND=noninteractive apt install -y build-essential openssh-client python3-dev git && apt clean && rm -rf /var/lib/apt/lists/*

# Setup heat dependencies
git clone https://github.com/helmholtz-analytics/heat.git
cd heat
pip install --upgrade pip
pip install mpi4py --no-binary :all:
pip install .[netcdf,hdf5,dev]

# Print environment
pip list | grep heat
pip list | grep torch
python --version
nvcc --version
mpirun --version

# Run tests
HEAT_TEST_USE_DEVICE=gpu mpirun -n 1 pytest heat/
18 changes: 18 additions & 0 deletions docker/scripts/test_nvidia_image_haicore_enroot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash

# Clear environment, else mpi4py will fail to install.
ml purge

SBATCH_PARAMS=(
--partition normal
--time 00:10:00
--nodes 1
--tasks-per-node 1
--gres gpu:1
--container-image ~/containers/nvidia+pytorch+23.05-py3.sqsh
--container-writable
--container-mounts /etc/slurm/task_prolog.hk:/etc/slurm/task_prolog.hk,/scratch:/scratch
--container-mount-home
)

sbatch "${SBATCH_PARAMS[@]}" ./install_print_test.sh
30 changes: 0 additions & 30 deletions docker/test_nvidia_image_haicore_enroot.sh

This file was deleted.

0 comments on commit 9826dfa

Please sign in to comment.