# 使用官方的 PyTorch 镜像作为基础镜像
FROM pytorch/pytorch:2.5.1-cuda12.4-cudnn9-devel

# 安装额外的 Python 包
RUN pip install --no-cache-dir jupyterlab pandas matplotlib

# 设置工作目录
WORKDIR /workspace

# 设置 JUPYTER_DATA_DIR 环境变量
ENV JUPYTER_DATA_DIR=/workspace/.jupyter

# 暴露 Jupyter 默认端口
EXPOSE 8888

# 启动 JupyterLab
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--no-browser"]
