美文网首页
docker file

docker file

作者: 夜空最亮的9星 | 来源:发表于2021-11-30 16:36 被阅读0次
FROM python:3.7

ENV NVIDIA_VISIBLE_DEVICES all
ENV NVIDIA_DRIVER_CAPABILITIES compute,utility

WORKDIR /code
COPY . .
RUN apt-get update
RUN apt-get install vim ffmpeg libsm6 libxext6 cron openssh-server -y
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt

# 修改容器時間
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai'>/etc/timezone

RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/'  /etc/ssh/sshd_config
RUN sed -i 's/UsePAM yes/UsePAM no/' /etc/ssh/sshd_config
RUN echo "root:123456" | chpasswd

RUN echo  "alias ll='ls -l'" >> ~/.bash_profile
RUN /bin/bash -c 'source  ~/.bash_profile;'

CMD ["python","app.py"]

相关文章

网友评论

      本文标题:docker file

      本文链接:https://www.haomeiwen.com/subject/nvpdxrtx.html