1- FROM amazonlinux:2
1+ FROM amazonlinux:2022
22
33# Notebook Port
44EXPOSE 8888
@@ -11,7 +11,8 @@ ENV pipargs=""
1111ENV WORKING_DIR="/root"
1212ENV NOTEBOOK_DIR="${WORKING_DIR}/notebooks"
1313ENV EXAMPLE_NOTEBOOK_DIR="${NOTEBOOK_DIR}/Example Notebooks"
14- ENV NODE_VERSION=14.x
14+ ENV NODE_VERSION=14
15+ ENV PYTHON_VERSION=3.10
1516ENV GRAPH_NOTEBOOK_AUTH_MODE="DEFAULT"
1617ENV GRAPH_NOTEBOOK_HOST="neptune.cluster-XXXXXXXXXXXX.us-east-1.neptune.amazonaws.com"
1718ENV GRAPH_NOTEBOOK_PROXY_PORT="8192"
@@ -36,18 +37,18 @@ RUN mkdir -p "${WORKING_DIR}" && \
3637 mkdir -p "${EXAMPLE_NOTEBOOK_DIR}" && \
3738 # Yum Update and install dependencies
3839 yum update -y && \
39- yum install tar gzip git amazon-linux-extras which -y && \
40+ yum install tar gzip git findutils -y && \
4041 # Install NPM/Node
41- curl --silent --location https://rpm.nodesource .com/setup_${NODE_VERSION} | bash - && \
42- yum install nodejs -y && \
43- npm install -g opencollective && \
44- # Install Python 3.8
45- amazon-linux-extras install python3.8 -y && \
46- update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 && \
42+ curl -o- https://raw.githubusercontent .com/nvm-sh/nvm/v0.39.3/install.sh | bash && \
43+ . ~/.nvm/nvm.sh && \
44+ nvm install ${NODE_VERSION} && \
45+ # Install Python
46+ yum install python${PYTHON_VERSION} -y && \
47+ # update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 && \
4748 echo 'Using python version:' && \
48- python3 --version && \
49- python3 -m ensurepip --upgrade && \
50- python3 -m venv /tmp/venv && \
49+ python${PYTHON_VERSION} --version && \
50+ python${PYTHON_VERSION} -m ensurepip --upgrade && \
51+ python${PYTHON_VERSION} -m venv /tmp/venv && \
5152 source /tmp/venv/bin/activate && \
5253 cd "${WORKING_DIR}" && \
5354 # Clone the repo and install python dependencies
@@ -67,14 +68,16 @@ RUN mkdir -p "${WORKING_DIR}" && \
6768 jupyter nbextension enable --py --sys-prefix graph_notebook.widgets && \
6869 # This allows for the `.ipython` to be set
6970 python -m graph_notebook.start_jupyterlab --jupyter-dir "${NOTEBOOK_DIR}" && \
71+ deactivate && \
7072 # Cleanup
7173 yum clean all && \
7274 yum remove wget tar git -y && \
7375 rm -rf /var/cache/yum && \
7476 rm -rf "${WORKING_DIR}/graph-notebook" && \
7577 rm -rf /root/.cache && \
7678 rm -rf /root/.npm/_cacache && \
77- rm -rf /usr/share
79+ cd /usr/share && \
80+ rm -r $(ls -A | grep -v terminfo)
7881
7982ADD "docker/Example-Remote-Server-Setup.ipynb" "${NOTEBOOK_DIR}/Example-Remote-Server-Setup.ipynb"
8083ADD ./docker/service.sh /usr/bin/service.sh
0 commit comments