본문 바로가기
Programming/Docker

Jupyter notebook with Dockerfile

by Chan_찬 2020. 10. 29.
728x90
반응형

jupyter

jupyter notebook을 docker에서 실행하기

Dockerfile

# tf2.3.0 docker makefile
FROM tensorflow/tensorflow:2.3.0-gpu

LABEL maintainer="chan"

RUN apt-get update && apt-get install -y --no-install-recommends \
    ssh git vim curl && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

COPY requirements.txt /tmp/requirements.txt

RUN pip3 install --upgrade pip && \
pip3 install setuptools wheel && \
pip3 install -r /tmp/requirements.txt

docker image build, run container, jupyter notebook install and setting, run

# build docker image
docker build tf_230 .
# run container
docker run -d --gpus all -p 80:8888 --name=notebook tf_230

# install jupyter notebook
docker exec -it notebook bash
pip install jupyter-lab notebook voila
jupyter notebook --ip=0.0.0.0 --port=8888 --allow-root --notebook-dir=/test
728x90
728x90
BIG
Buy me a coffeeBuy me a coffee

댓글