Last active
March 24, 2024 08:26
-
-
Save lzqlzzq/1874dd8740f399ccad5a61745473bc3d to your computer and use it in GitHub Desktop.
A docker deep learning environment setup for my workstation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# docker build -t dlkit -f dlkit.dockerfile . | |
# docker run -itd --gpus all -p 8888:8888 -p 6006:6006 --ipc host -v ~/workspace/dlkit1:/workspace --name dlkit1 dlkit | |
FROM pytorch/pytorch:2.2.1-cuda12.1-cudnn8-runtime | |
ENV SHELL=/bin/bash | |
WORKDIR /workspace | |
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple | |
RUN sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list | |
RUN sed -i 's/security.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list | |
RUN ln -s /usr/bin/python3 /usr/bin/python | |
RUN apt-get update && apt-get install -y \ | |
vim \ | |
git | |
RUN pip install jupyterlab tensorboard | |
COPY entrypoint.sh /entrypoint.sh | |
RUN chmod +x /entrypoint.sh | |
EXPOSE 8888 | |
EXPOSE 6006 | |
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
jupyter lab --ip=0.0.0.0 --port=8888 --allow-root --no-browser & | |
tensorboard --logdir /workspace/tf-logs --bind_all & | |
wait -n | |
exit $? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment