Skip to content

Commit

Permalink
Preloading oras://ghcr.io images via CURL
Browse files Browse the repository at this point in the history
  • Loading branch information
maouw committed Oct 28, 2023
1 parent 4f46bd6 commit 5003415
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hyakvnc
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ EOF
function cmd_create {
local apptainer_start_args=()
local sbatch_args=(--parsable)
local container_basename container_name start
local container_basename container_name start tailpid
# <TODO> If a job ID was specified, don't launch a new job
# <TODO> If a job ID was specified, check that the job exists and is running

Expand Down Expand Up @@ -1213,6 +1213,7 @@ function cmd_create {
if check_log_level "${HYAKVNC_LOG_LEVEL}" DEBUG; then
echo "Streaming log from ${jobdir}/slurm.log"
tail -n 1 -f "${jobdir}/slurm.log" --pid=$$ 2>/dev/null | sed --unbuffered 's/^/DEBUG: slurm.log: /' & # Follow the SLURM log file in the background
tailpid=$!
fi

case "${HYAKVNC_APPTAINER_CONTAINER}" in
Expand Down Expand Up @@ -1249,7 +1250,7 @@ function cmd_create {

break
done

grep -q '^xstartup.turbovnc: Executing' <(timeout "${HYAKVNC_DEFAULT_TIMEOUT}" tail -f "${jobdir}/vnc/vnc.log" || true)

log INFO "VNC server started"
Expand All @@ -1260,7 +1261,7 @@ function cmd_create {
}
# Stop trapping the signals:
[[ -z "${XNOTRAP:-}" ]] && trap - SIGINT SIGTERM SIGHUP SIGABRT SIGQUIT ERR EXIT
kill -9 %tail 2>/dev/null # Stop following the SLURM log file
kill -9 "${tailpid}" 2>/dev/null # Stop following the SLURM log file
return 0
}

Expand Down

0 comments on commit 5003415

Please sign in to comment.