21 lines
627 B
Text
21 lines
627 B
Text
|
|
FROM pytorch/pytorch:2.5.0-cuda12.4-cudnn9-runtime
|
||
|
|
|
||
|
|
RUN apt-get update && apt-get install -y openssh-server && rm -rf /var/lib/apt/lists/*
|
||
|
|
RUN mkdir -p /run/sshd
|
||
|
|
|
||
|
|
# Allow root login with no password (vast.ai injects keys at runtime)
|
||
|
|
RUN sed -i 's/#PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config \
|
||
|
|
&& sed -i 's/#PermitEmptyPasswords.*/PermitEmptyPasswords yes/' /etc/ssh/sshd_config \
|
||
|
|
&& passwd -d root
|
||
|
|
|
||
|
|
WORKDIR /workspace
|
||
|
|
|
||
|
|
COPY worker/worker.py /workspace/worker.py
|
||
|
|
COPY jobs/ /workspace/jobs/
|
||
|
|
|
||
|
|
COPY docker/worker-entrypoint.sh /entrypoint.sh
|
||
|
|
RUN chmod +x /entrypoint.sh
|
||
|
|
|
||
|
|
EXPOSE 22
|
||
|
|
CMD ["/entrypoint.sh"]
|