我在使用ICM公司的集群。它提供了一种方便的方式来配置remote by docker:

因此,我希望为我的开发环境(python包、cuda、一些实用程序脚本(如screen和rsync,以及一些必要的data)构建一个在远程机器上部署的对接映像。这是我的Dockerfile
# syntax=docker/dockerfile:1
FROM pytorch/pytorch:1.7.1-cuda11.0-cudnn8-runtime
WORKDIR /app
RUN sudo apt-get install rsync
RUN sudo apt-get install screen
RUN conda create --prefix /data/vxxx/nn python=3.8
RUN conda init
# shotcut for activating my environment
RUN echo 'alias nn="conda activate /data/xxx/nn"' >> ~/.bashrc
RUN source ~/.bashrc
RUN nn
RUN pip3 install torchtext==0.8.1 pandas scipy scikit-learn transformers tensroboard -f https://download.pytorch.org/whl/torch_stable.html
# copy files from windows
COPY /mnt/c/test .
RUN cd /data
RUN mkdir xxx
RUN cd xxx
RUN mkdir Data
RUN mkdir Code
RUN cd Code
RUN git clone https://github.com/namespace-Pt/Document-Reduction.git
RUN git config --global user.name 'xxx'
RUN git config --global user.email 'xxx@1.com'
CMD [ "sleep", "infinity"]我是刚接触过docker的人,我遵循了正式的python图像教程,我有以下问题:
WORKDIR是什么意思?它是否意味着创建一个存储所有文件的新目录?COPY命令不能工作?G 220
发布于 2021-08-10 07:49:05
这里的初学者,据我所知。
https://stackoverflow.com/questions/68722342
复制相似问题