-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun.sh
executable file
·19 lines (15 loc) · 1009 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# Check if the correct number of arguments is provided
if [ "$#" -ne 3 ]; then
echo "Usage: $0 <GPU_NUMBER> <FOLDER_NAME> <PYTHON_SCRIPT>"
exit 1
fi
# Assign the provided arguments to variables
GPU_NUMBER="$1"
FOLDER_NAME="$2"
PYTHON_SCRIPT="$3"
# Build the container image
podman build . -t deepmol_case_study
# Run the container with the specified Python script as the command
podman run -v /home/jcapela/deepmol_case_studies/scripts/tdc/"$FOLDER_NAME"/:/workspace/scripts/tdc/"$FOLDER_NAME"/:z -d --device nvidia.com/gpu="$GPU_NUMBER" --security-opt=label=disable --name="$FOLDER_NAME" deepmol_case_study /bin/bash -c "cd /workspace/scripts/tdc/$FOLDER_NAME/ && python $PYTHON_SCRIPT > output.txt"
#podman run -v /home/jcapela/deepmol_case_studies/scripts/tdc/:/workspace/scripts/tdc/:z -d --device nvidia.com/gpu="$GPU_NUMBER" --security-opt=label=disable --name="run_for_test_set" deepmol_case_study /bin/bash -c "cd /workspace/scripts/tdc/ && python $PYTHON_SCRIPT > output.txt"