File tree Expand file tree Collapse file tree 4 files changed +22
-3
lines changed
Expand file tree Collapse file tree 4 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 6565 password : ${{ secrets.DOCKERHUB_TOKEN }}
6666 - name : Set up QEMU
6767 uses : docker/setup-qemu-action@v3
68+ - name : Free up some space
69+ run : |
70+ df -h /
71+ du -hs /usr/share/dotnet
72+ rm -rf /usr/share/dotnet
73+ df -h /
6874 - name : Build and upload to DockerHub
6975 run : |
70- if [ "${{ matrix.flavor }}" = "base" ]; then
76+ if [ "${{ matrix.flavor }}" = "base" ]; then
7177 FILE="base/Dockerfile"
7278 elif [ "${{ matrix.flavor }}" = "devel" ]; then
7379 FILE="base/Dockerfile"
Original file line number Diff line number Diff line change @@ -77,3 +77,5 @@ RUN apt-get update \
7777 && rm -rf /var/lib/apt/lists/* \
7878 && echo "${NCCL_HOME}/lib" >> /etc/ld.so.conf.d/nccl.conf \
7979 && ldconfig
80+
81+ WORKDIR /dstack/run
Original file line number Diff line number Diff line change @@ -24,12 +24,21 @@ RUN export DEBIAN_FRONTEND=noninteractive \
2424 && dpkg-reconfigure --frontend noninteractive tzdata \
2525 && apt-get install -y bzip2 ca-certificates curl build-essential git libglib2.0-0 libsm6 libxext6 libxrender1 mercurial openssh-server subversion wget \
2626 libibverbs1 ibverbs-providers ibverbs-utils libibverbs-dev infiniband-diags \
27- && rm -rf /var/lib/apt/lists/* \
2827 && sed -i "s/.*PasswordAuthentication.*/PasswordAuthentication no/g" /etc/ssh/sshd_config \
2928 && mkdir /run/sshd \
3029 && mkdir ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys \
3130 && chmod 600 ~/.ssh/authorized_keys \
32- && rm /etc/ssh/ssh_host_*
31+ && rm /etc/ssh/ssh_host_* \
32+ # User
33+ && apt-get install -y sudo \
34+ && groupadd -g 1000 dstack \
35+ && useradd -u 1000 -g 1000 -G sudo -s /bin/bash -m dstack \
36+ && echo 'dstack ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/dstack \
37+ # Default working dir
38+ && mkdir -p /dstack/run \
39+ && chmod a+rwx /dstack/run \
40+ # Cleanup
41+ && rm -rf /var/lib/apt/lists/*
3342
3443RUN curl -LsSf https://astral.sh/uv/install.sh | INSTALLER_NO_MODIFY_PATH=1 sh \
3544 && uv python install --preview --default
Original file line number Diff line number Diff line change @@ -74,3 +74,5 @@ RUN cd /opt \
7474 MPI_HOME=${OPEN_MPI_PATH} \
7575 CUDA_HOME=${CUDA_HOME} \
7676 NCCL_HOME=${NCCL_HOME}
77+
78+ WORKDIR /dstack/run
You can’t perform that action at this time.
0 commit comments