Skip to content

Commit

Permalink
Merge pull request #707 from omertuc/formatting
Browse files Browse the repository at this point in the history
ilab wrapper: fix formatting
  • Loading branch information
rhatdan authored Jul 30, 2024
2 parents f9ed8bb + 34e60b1 commit e273eae
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
20 changes: 10 additions & 10 deletions training/ilab-wrapper/ilab
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ export ENTRYPOINT="/opt/python3.11/venv/bin/ilab"
export PARAMS=("$@")

for dir in "$HOME/.cache" "$HOME/.config" "$HOME/.local"; do
mkdir -p "$dir"
mkdir -p "$dir"
done

if [[ "$1" = "shell" ]]; then
export ENTRYPOINT=bash
export PARAMS=()
export ENTRYPOINT=bash
export PARAMS=()
fi

PODMAN_COMMAND=("podman" "run" "--rm" "-it"
"--device" "${CONTAINER_DEVICE}"
"--security-opt" "label=disable" "--net" "host"
"-v" "$HOME:$HOME"
"--env" "HOME"
"--entrypoint" "$ENTRYPOINT"
"--env" "HF_TOKEN"
"${IMAGE_NAME}")
"--device" "${CONTAINER_DEVICE}"
"--security-opt" "label=disable" "--net" "host"
"-v" "$HOME:$HOME"
"--env" "HOME"
"--entrypoint" "$ENTRYPOINT"
"--env" "HF_TOKEN"
"${IMAGE_NAME}")

exec "${PODMAN_COMMAND[@]}" "${PARAMS[@]}"
20 changes: 10 additions & 10 deletions training/nvidia-bootc/duplicated/ilab-wrapper/ilab
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ export ENTRYPOINT="/opt/python3.11/venv/bin/ilab"
export PARAMS=("$@")

for dir in "$HOME/.cache" "$HOME/.config" "$HOME/.local"; do
mkdir -p "$dir"
mkdir -p "$dir"
done

if [[ "$1" = "shell" ]]; then
export ENTRYPOINT=bash
export PARAMS=()
export ENTRYPOINT=bash
export PARAMS=()
fi

PODMAN_COMMAND=("podman" "run" "--rm" "-it"
"--device" "${CONTAINER_DEVICE}"
"--security-opt" "label=disable" "--net" "host"
"-v" "$HOME:$HOME"
"--env" "HOME"
"--entrypoint" "$ENTRYPOINT"
"--env" "HF_TOKEN"
"${IMAGE_NAME}")
"--device" "${CONTAINER_DEVICE}"
"--security-opt" "label=disable" "--net" "host"
"-v" "$HOME:$HOME"
"--env" "HOME"
"--entrypoint" "$ENTRYPOINT"
"--env" "HF_TOKEN"
"${IMAGE_NAME}")

exec "${PODMAN_COMMAND[@]}" "${PARAMS[@]}"

0 comments on commit e273eae

Please sign in to comment.