vc/dockerfile

21 lines
437 B
Plaintext
Raw Normal View History

2024-11-12 00:41:13 +08:00
FROM pytorch/pytorch:2.4.0-cuda12.1-cudnn9-devel
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /root/.cache/pip
RUN chmod +x training/train_py.sh
RUN echo '#!/bin/bash\n\
cd /app/training && ./train_py.sh\n\
cd /app && python inference.py\n\
' > /app/run.sh && chmod +x /app/run.sh
ENTRYPOINT ["/app/run.sh"]