Spaces:
Build error
Build error
File size: 1,308 Bytes
daf0288 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
ARG BASE_IMAGE="nvidia/cuda:12.2.2-devel-ubuntu22.04"
FROM ${BASE_IMAGE}
ARG HOMEDIRECTORY="/myhome"
ENV HOMEDIRECTORY=$HOMEDIRECTORY
USER root
RUN apt-get update && \
apt-get install -y --no-install-recommends \
curl \
python3 \
python3-pip \
python3-dev \
poppler-utils \
gcc \
git \
git-lfs \
htop \
libgl1 \
libglib2.0-0 \
ncdu \
openssh-client \
openssh-server \
psmisc \
rsync \
screen \
sudo \
tmux \
unzip \
vim \
wget && \
wget -q https://github.com/justjanne/powerline-go/releases/download/v1.24/powerline-go-linux-"$(dpkg --print-architecture)" -O /usr/local/bin/powerline-shell && \
chmod a+x /usr/local/bin/powerline-shell
RUN ln -s /usr/bin/python3 /usr/bin/python
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu117
# setup ssh
RUN ssh-keygen -A
RUN sed -i 's/#*PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
EXPOSE 22
# Make the root user's home directory /myhome (the default for run.ai),
# and allow to login with password 'root'.
RUN echo 'root:root' | chpasswd
RUN sed -i 's|:root:/root:|:root:/myhome:|' /etc/passwd
ENTRYPOINT sudo service ssh start && /bin/bash
|