Skip to content

Commit 16d9836

Browse files
committed
Fix dockerfile
1 parent 6a60487 commit 16d9836

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/amd64 nvidia/cuda:12.4.1-cudnn-runtime-ubuntu22.04 AS linux-base
1+
FROM --platform=linux/amd64 python:3.12-slim AS linux-base
22

33
# Environment variables
44
ENV UV_PROJECT_ENVIRONMENT="/venv"
@@ -13,7 +13,8 @@ RUN rm -f /etc/apt/sources.list.d/*.list
1313
# Utilities
1414
RUN apt-get update && apt-get upgrade -y
1515
RUN apt-get install -y --no-install-recommends build-essential \
16-
sudo curl git htop less rsync screen vim nano wget openssh-client
16+
sudo curl git htop less rsync screen vim nano wget ca-certificates \
17+
openssh-client zsh
1718

1819
# Download and install VS Code Server CLI
1920
RUN wget -O /tmp/vscode-server-cli.tar.gz "https://update.code.visualstudio.com/latest/cli-linux-x64/stable" && \
@@ -24,11 +25,9 @@ RUN wget -O /tmp/vscode-server-cli.tar.gz "https://update.code.visualstudio.com/
2425
# Slurm
2526
RUN COMMANDS="sacct sacctmgr salloc sattach sbatch sbcast scancel scontrol sdiag sgather sinfo smap sprio squeue sreport srun sshare sstat strigger sview" \
2627
&& for CMD in $COMMANDS; do \
27-
cat > "/usr/local/bin/$CMD" << EOF
28-
#!/bin/bash
29-
ssh \$USER@\$SLURM_CLUSTER_NAME "bash -l -c '$CMD \"\$@\"'"
30-
EOF
31-
chmod +x "/usr/local/bin/$CMD"; \
28+
echo '#!/bin/bash' > "/usr/local/bin/$CMD" \
29+
&& echo 'ssh $USER@$SLURM_CLUSTER_NAME "bash -l -c '\'''"$CMD"' \"$@\"'\''"' >> "/usr/local/bin/$CMD" \
30+
&& chmod +x "/usr/local/bin/$CMD"; \
3231
done
3332

3433
FROM linux-base AS python-base

0 commit comments

Comments
 (0)