Skip to content

Commit 20350e9

Browse files
committed
chore: Move container-image spec to parameter (#1145)
1 parent f9e9161 commit 20350e9

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

internal/remote/firecrest/session_script.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,6 @@ fi
143143
# Create the environment.toml file to run the session
144144
EDF_FILE="${SESSION_DIR}/environment.toml"
145145
cat <<EOF >"${EDF_FILE}"
146-
image = "${REMOTE_SESSION_IMAGE}"
147-
148146
#{{SESSION_MOUNTS_PLACEHOLDER}}
149147
150148
workdir = "${SESSION_WORK_DIR}"
@@ -153,6 +151,8 @@ workdir = "${SESSION_WORK_DIR}"
153151
com.hooks.cxi.enabled = "false"
154152
EOF
155153

154+
srun_param_container_image="--container-image ${REMOTE_SESSION_IMAGE}"
155+
156156
export RENKU_MOUNT_DIR="${SESSION_WORK_DIR}"
157157
export RENKU_WORKING_DIR="${SESSION_WORK_DIR}"
158158
# Force the frontend to listen on 127.0.0.1
@@ -249,6 +249,10 @@ echo "Starting session..."
249249
# Start session while listening to EXIT signals
250250
pid=
251251
trap 'exit_script && [[ $pid ]] && kill -TERM "$pid" && exit_script' EXIT
252-
srun --environment "${EDF_FILE}" --no-container-entrypoint sh /etc/rc & pid=$!
252+
srun \
253+
--environment "${EDF_FILE}" \
254+
${srun_param_container_image} \
255+
--no-container-entrypoint sh /etc/rc \
256+
& pid=$!
253257
wait
254258
pid=

0 commit comments

Comments
 (0)