Files
pytorch-study/Dockerfile

17 lines
524 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 使用官方 PyTorch CPU 基础镜像
FROM pytorch/pytorch:latest
# 安装 Jupyter Lab 和常用库
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple && \
pip install --upgrade pip && \
pip install jupyterlab matplotlib pandas seaborn tensorboard visdom
# 设置默认工作目录
WORKDIR /workspace
# 暴露端口Jupyter、TensorBoard、Visdom
EXPOSE 8888 6006 8097
# 默认启动 Jupyter Lab
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"]