23 lines
651 B
Text
23 lines
651 B
Text
|
|
FROM python:3.13-slim
|
||
|
|
|
||
|
|
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
|
||
|
|
RUN sed -i 's/#PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config \
|
||
|
|
&& sed -i 's/#PermitEmptyPasswords.*/PermitEmptyPasswords yes/' /etc/ssh/sshd_config \
|
||
|
|
&& passwd -d root
|
||
|
|
|
||
|
|
RUN pip install --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu
|
||
|
|
|
||
|
|
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"]
|