Skip to content

Commit

Permalink
fix jupyter cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
freeliuzc committed May 24, 2022
1 parent afd20cc commit f54a5ca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions tekton/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ FROM paddlepaddle/paddle:${IMAGE_TAG}
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]

ARG PADDLE_TOOLKIT
COPY ${PADDLE_TOOLKIT} ./${PADDLE_TOOLKIT}
Expand All @@ -15,12 +14,15 @@ COPY ${PADDLE_TOOLKIT} ./${PADDLE_TOOLKIT}

RUN pip3.7 install --upgrade pip
RUN pip3.7 install jupyter -U && pip3.7 install jupyterlab
RUN pip3.7 install --upgrade ipykernel ipython

WORKDIR /home/${PADDLE_TOOLKIT}

# toolkit install
RUN pip3.7 install -r requirements.txt
RUN python3.7 setup.py install

# CMD ["sleep", "infinity"]
CMD ["jupyter lab", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--notebook-dir=/home"]
ENTRYPOINT ["/tini", "--"]
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--notebook-dir=/home"]

EXPOSE 8888
8 changes: 5 additions & 3 deletions tekton/dockerfiles/Dockerfile.rocm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ FROM paddlepaddle/paddle:${IMAGE_TAG}
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
ENTRYPOINT ["/tini", "--"]

ARG PADDLE_TOOLKIT
COPY ${PADDLE_TOOLKIT} ./${PADDLE_TOOLKIT}
Expand All @@ -15,6 +14,7 @@ COPY ${PADDLE_TOOLKIT} ./${PADDLE_TOOLKIT}

RUN pip install --upgrade pip
RUN pip install jupyter -U && pip3.7 install jupyterlab
RUN pip install --upgrade ipykernel ipython
RUN pip install paddlepaddle-rocm -f https://paddle-wheel.bj.bcebos.com/2.3.0/rocm/paddlepaddle_rocm-2.3.0.post401-cp37-cp37m-linux_x86_64.whl -i https://mirror.baidu.com/pypi/simple

WORKDIR /opt/${PADDLE_TOOLKIT}
Expand All @@ -23,5 +23,7 @@ WORKDIR /opt/${PADDLE_TOOLKIT}
RUN pip install -r requirements.txt
RUN python setup.py install

# CMD ["sleep", "infinity"]
CMD ["jupyter lab", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--notebook-dir=/home"]
ENTRYPOINT ["/tini", "--"]
CMD ["jupyter", "lab", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--notebook-dir=/opt"]

EXPOSE 8888

0 comments on commit f54a5ca

Please sign in to comment.