Skip to content

Commit

Permalink
Move docker container to port 9999 and some other minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-penev committed Oct 30, 2023
1 parent 7d782d3 commit 9b353e7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ARG BASE_CONTAINER=jupyter/base-notebook
ARG BASE_TAG=latest
ARG BUILD_TYPE=Debug


FROM $BASE_CONTAINER:$BASE_TAG

LABEL maintainer="Xeus-cpp Project"
Expand Down Expand Up @@ -61,7 +62,8 @@ USER ${NB_UID}
# Copy git repository to home directory of container
COPY --chown=${NB_UID}:${NB_GID} . "${HOME}"/

EXPOSE 8888
EXPOSE 9999
ENV JUPYTER_PORT=9999

# Configure container startup
CMD ["start-notebook.sh", "--debug", "&>/home/jovyan/log.txt"]
Expand Down Expand Up @@ -108,8 +110,9 @@ ENV NB_PYTHON_PREFIX=${CONDA_DIR} \
/opt/conda/envs/.venv/x86_64-conda-linux-gnu/include/c++/12.3.0:\
/opt/conda/envs/.venv/x86_64-conda-linux-gnu/include/c++/12.3.0/x86_64-conda-linux-gnu:\
/opt/conda/envs/.venv/x86_64-conda-linux-gnu/include/c++/12.3.0/backward:\
/opt/conda/envs/.venv/x86_64-conda-linux-gnu/sysroot/usr/include

/opt/conda/envs/.venv/x86_64-conda-linux-gnu/sysroot/usr/include:\
#
/usr/include

# VENV

Expand Down Expand Up @@ -185,8 +188,8 @@ RUN \
conda activate .venv && \
#
export PATH_TO_LLVM_BUILD=${VENV} && \
#export PATH=${VENV}/bin:${CONDA_DIR}/bin:$PATH_TO_LLVM_BUILD/bin:$PATH && \
export PATH=${VENV}/bin:${CONDA_DIR}/bin:$PATH && \
###export PATH=${VENV}/bin:${CONDA_DIR}/bin:$PATH_TO_LLVM_BUILD/bin:$PATH && \
##export PATH=${VENV}/bin:${CONDA_DIR}/bin:$PATH && \
echo "export EDITOR=emacs" >> ~/.profile && \
#
# Build CppInterOp
Expand Down
2 changes: 1 addition & 1 deletion run-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jupyter-repo2docker \
.

#docker run --gpus all --publish 8888:8888 --name xeus-cpp-c -i -t xeus-cpp "start-notebook.sh"
docker run --rm --runtime=nvidia --gpus all --publish 8888:8888 --name xeus-cpp-c -i -t xeus-cpp "start-notebook.sh"
docker run --rm --runtime=nvidia --gpus all --publish 9999:9999 --name xeus-cpp-c -i -t xeus-cpp "start-notebook.sh"

# --editable \
# --ref InterOpIntegration \
Expand Down
1 change: 1 addition & 0 deletions share/jupyter/kernels/xcpp/kernel.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"@CMAKE_VENV_PATH@/bin/xcpp",
"-f",
"{connection_file}",
"-cuda",
"-std=c++17"@CMAKE_OMP@
],
"language": "cpp",
Expand Down
1 change: 0 additions & 1 deletion src/xmagics/pythonexec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ void pythonexec::startup() {
// if (!gMainDict)
// printf("Could not add module __main__");


// // Retrieve the dictionary of cppyy module
// PyObject* cppyyDict = PyModule_GetDict(cppyyModule);
// Py_DECREF(cppyyModule);
Expand Down

0 comments on commit 9b353e7

Please sign in to comment.