-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix compatibility issues with the latest version of apptainer
- Loading branch information
Showing
8 changed files
with
43 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
NODENAME=rabbit@localhost |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,13 +40,14 @@ From: pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime | |
|
||
# Install and set up RabbbitMQ | ||
chmod +x /docker/install-rabbitmq.sh && /docker/install-rabbitmq.sh | ||
cp /docker/rabbitmq-env.conf /etc/rabbitmq/rabbitmq-env.conf | ||
|
||
RABBITMQ_USER=user && RABBITMQ_PASSWORD=user | ||
service rabbitmq-server start | ||
/etc/init.d/rabbitmq-server start | ||
rabbitmqctl add_user $RABBITMQ_USER $RABBITMQ_PASSWORD 2>/dev/null | ||
rabbitmqctl set_user_tags $RABBITMQ_USER administrator | ||
rabbitmqctl set_permissions -p / $RABBITMQ_USER ".*" ".*" ".*" | ||
service rabbitmq-server stop | ||
/etc/init.d/rabbitmq-server stop | ||
|
||
# Set up nginx | ||
cp /docker/nginx.conf /etc/nginx/nginx.conf | ||
|
@@ -80,16 +81,19 @@ From: pytorch/pytorch:1.10.0-cuda11.3-cudnn8-runtime | |
mkdir -p $HOME/.elephant_binds/var/run | ||
cp -a /var/log $HOME/.elephant_binds/var/ | ||
cp -a /var/lib $HOME/.elephant_binds/var/ | ||
mkdir -p $HOME/.elephant_binds/etc | ||
cp -a /etc/nginx $HOME/.elephant_binds/etc/ | ||
cp -a /etc/rabbitmq $HOME/.elephant_binds/etc/ | ||
|
||
%labels | ||
Author Ko Sugawara <[email protected]> | ||
|
||
%help | ||
This is a container to run ELEPHANt server. | ||
Usage: | ||
singularity build --fakeroot elephant.sif elephant.def | ||
singularity run --fakeroot elephant.sif | ||
singularity instance start --nv --bind $HOME/.elephant_binds/var/lib:/var/lib,$HOME/.elephant_binds/var/log:/var/log,$HOME/.elephant_binds/var/run:/var/run,$ELEPHANT_WORKSPACE:/workspace elephant.sif elephant | ||
singularity exec instance://elephant python /opt/elephant/script/dataset_generator.py --uint16 /workspace/datasets/elephant-demo/elephant-demo.h5 /workspace/datasets/elephant-demo | ||
SINGULARITYENV_CUDA_VISIBLE_DEVICES=0 singularity exec instance://elephant /start.sh | ||
singularity instance stop elephant | ||
apptainer build --fakeroot elephant.sif elephant.def | ||
apptainer run --bind $HOME elephant.sif | ||
apptainer instance start --nv --bind $HOME,$HOME/.elephant_binds/var/lib:/var/lib,$HOME/.elephant_binds/var/log:/var/log,$HOME/.elephant_binds/var/run:/var/run,$HOME/.elephant_binds/etc/nginx:/etc/nginx,$HOME/.elephant_binds/etc/rabbitmq:/etc/rabbitmq,$ELEPHANT_WORKSPACE:/workspace elephant.sif elephant | ||
apptainer exec instance://elephant python /opt/elephant/script/dataset_generator.py --uint16 /workspace/datasets/elephant-demo/elephant-demo.h5 /workspace/datasets/elephant-demo | ||
SINGULARITYENV_CUDA_VISIBLE_DEVICES=0 apptainer exec instance://elephant /start.sh | ||
apptainer instance stop elephant |