Skip to content

Commit 8c77f72

Browse files
authored
Fix Bug for Cloning Repository (#142)
* change config * add echo statements for debugging * fix bug * remove repo check * change config * remove client.software
1 parent 7fd550e commit 8c77f72

File tree

3 files changed

+18
-19
lines changed

3 files changed

+18
-19
lines changed

lablink-allocator/lablink-allocator-service/conf/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ db:
99

1010
machine:
1111
machine_type: "g4dn.xlarge"
12-
image: "ghcr.io/talmolab/lablink-client-base-image:linux-amd64-test"
12+
image: "ghcr.io/talmolab/lablink-sleap-client-image:linux-amd64-test"
1313
ami_id: "ami-067cc81f948e50e06"
1414
repository: "https://github.com/talmolab/sleap-tutorial-data.git"
15-
software: "mousepad"
15+
software: "sleap"
1616

1717
app:
1818
admin_user: "admin"

lablink-allocator/lablink-allocator-service/terraform/user_data.sh

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
#!/bin/bash
22
set -euo pipefail
33

4+
echo ">> Configuration:"
5+
echo " - Allocator IP: ${allocator_ip}"
6+
echo " - Resource Suffix: ${resource_suffix}"
7+
echo " - Count Index: ${count_index}"
8+
echo " - Subject Software: ${subject_software}"
9+
echo " - Image Name: ${image_name}"
10+
echo " - Machine Type GPU Support: ${gpu_support}"
11+
echo " - GitHub Repository: ${repository}"
12+
413
echo ">> Checking GPU Support…"
514

615

@@ -61,21 +70,11 @@ if [ "$HAS_GPU" = true ]; then
6170
fi
6271

6372
echo ">> Starting container..."
64-
if [ -z "$${repository:-}" ]; then
65-
echo ">> No repo specified; starting container without cloning."
66-
docker run -dit $DOCKER_GPU_ARGS \
67-
-e ALLOCATOR_HOST="${allocator_ip}" \
68-
-e VM_NAME="lablink-vm-${resource_suffix}-${count_index}" \
69-
-e SUBJECT_SOFTWARE="${subject_software}" \
70-
"${image_name}"
71-
else
72-
echo ">> Cloning repo and starting container."
73-
docker run -dit $DOCKER_GPU_ARGS \
74-
-e ALLOCATOR_HOST="${allocator_ip}" \
75-
-e TUTORIAL_REPO_TO_CLONE="${repository}" \
76-
-e VM_NAME="lablink-vm-${resource_suffix}-${count_index}" \
77-
-e SUBJECT_SOFTWARE="${subject_software}" \
78-
"${image_name}"
79-
fi
73+
docker run -dit $DOCKER_GPU_ARGS \
74+
-e ALLOCATOR_HOST="${allocator_ip}" \
75+
-e TUTORIAL_REPO_TO_CLONE="${repository}" \
76+
-e VM_NAME="lablink-vm-${resource_suffix}-${count_index}" \
77+
-e SUBJECT_SOFTWARE="${subject_software}" \
78+
"${image_name}"
8079

8180
echo ">> Container launched."

lablink-client-base/lablink-client-base-image/start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ else
2323
fi
2424

2525
# Activate the conda environment and run the subscribe script
26-
/home/client/miniforge3/bin/conda run -n base subscribe allocator.host=$ALLOCATOR_HOST allocator.port=80 client.software=$SUBJECT_SOFTWARE &
26+
/home/client/miniforge3/bin/conda run -n base subscribe allocator.host=$ALLOCATOR_HOST allocator.port=80 &
2727

2828
# Wait for the subscribe script to start
2929
sleep 5

0 commit comments

Comments
 (0)