-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_docker.sh
executable file
·48 lines (39 loc) · 1.25 KB
/
run_docker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
set -e
# If .env does not exist, exit with error
if [ ! -f .env ]; then
echo "You need to create a .env file in the project root directory. See env.example for an example."
exit 1
fi
source .env
# If INPUTDATA var is not set, exit with error
if [ -z "$INPUTDATA" ]; then
echo "You need to set the INPUTDATA variable in your .env file."
exit 1
fi
if [ ! -d ctsm ]; then
echo "Cloning ctsm repository from $CTSM_REPO"
git clone $CTSM_REPO ctsm
cd ctsm
echo "Checking out branch $CTSM_BRANCH"
git checkout $CTSM_TAG
echo "Checking out ctsm externals"
./manage_externals/checkout_externals
cd ..
fi
docker run \
--rm \
-it \
--entrypoint /ctsm-api/docker/entrypoint.sh \
-e HOST_USER=${HOST_USER} \
-e HOST_UID=${HOST_UID} \
-e HOST_GID=${HOST_GID} \
-v $(pwd)/docker/ctsm/entrypoint.sh:/ctsm-api/docker/entrypoint.sh \
-v $(pwd)/docker/ctsm//dotcime:/ctsm-api/resources/dotcime \
-v $(pwd)/ctsm:/ctsm-api/resources/ctsm \
-v $(pwd)/scripts:/ctsm-api/scripts \
-v $(pwd)/cases:/ctsm-api/resources/cases \
-v $(pwd)/data:/ctsm-api/resources/data \
-v $(pwd)/tests:/ctsm-api/resources/tests \
-v $INPUTDATA:/inputdata \
ghcr.io/noresmhub/ctsm-api:latest