Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to Dockerfile for support of Python3.10 #519

Merged
merged 3 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Starting with v1.31.6, this file will contain a record of major features and upd
## Upcoming
- Added `--explain-type` option to `%%gremlin` ([Link to PR](https://github.com/aws/graph-notebook/pull/503))
- Added general documentation for `%%graph_notebook_config` options ([Link to PR](https://github.com/aws/graph-notebook/pull/504))
- Modified Dockerfile to support Python 3.10 ([Link to PR](https://github.com/aws/graph-notebook/pull/519))
- Updated Docker documentation with platform-specific run commands ([Link to PR](https://github.com/aws/graph-notebook/pull/502))
- Fixed deprecation warnings in GitHub workflows ([Link to PR](https://github.com/aws/graph-notebook/pull/506))
- Fixed seed dataset unzip path in Identity Graph sample notebook ([Link to PR](https://github.com/aws/graph-notebook/pull/507))
Expand Down
29 changes: 16 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM amazonlinux:2
FROM amazonlinux:2022

# Notebook Port
EXPOSE 8888
Expand All @@ -11,7 +11,8 @@ ENV pipargs=""
ENV WORKING_DIR="/root"
ENV NOTEBOOK_DIR="${WORKING_DIR}/notebooks"
ENV EXAMPLE_NOTEBOOK_DIR="${NOTEBOOK_DIR}/Example Notebooks"
ENV NODE_VERSION=14.x
ENV NODE_VERSION=14
ENV PYTHON_VERSION=3.10
ENV GRAPH_NOTEBOOK_AUTH_MODE="DEFAULT"
ENV GRAPH_NOTEBOOK_HOST="neptune.cluster-XXXXXXXXXXXX.us-east-1.neptune.amazonaws.com"
ENV GRAPH_NOTEBOOK_PROXY_PORT="8192"
Expand All @@ -36,18 +37,18 @@ RUN mkdir -p "${WORKING_DIR}" && \
mkdir -p "${EXAMPLE_NOTEBOOK_DIR}" && \
# Yum Update and install dependencies
yum update -y && \
yum install tar gzip git amazon-linux-extras which -y && \
yum install tar gzip git findutils -y && \
# Install NPM/Node
curl --silent --location https://rpm.nodesource.com/setup_${NODE_VERSION} | bash - && \
yum install nodejs -y && \
npm install -g opencollective && \
# Install Python 3.8
amazon-linux-extras install python3.8 -y && \
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.8 1 && \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash && \
. ~/.nvm/nvm.sh && \
nvm install ${NODE_VERSION} && \
# Install Python
yum install python${PYTHON_VERSION} -y && \
# update-alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 && \
echo 'Using python version:' && \
python3 --version && \
python3 -m ensurepip --upgrade && \
python3 -m venv /tmp/venv && \
python${PYTHON_VERSION} --version && \
python${PYTHON_VERSION} -m ensurepip --upgrade && \
python${PYTHON_VERSION} -m venv /tmp/venv && \
source /tmp/venv/bin/activate && \
cd "${WORKING_DIR}" && \
# Clone the repo and install python dependencies
Expand All @@ -67,14 +68,16 @@ RUN mkdir -p "${WORKING_DIR}" && \
jupyter nbextension enable --py --sys-prefix graph_notebook.widgets && \
# This allows for the `.ipython` to be set
python -m graph_notebook.start_jupyterlab --jupyter-dir "${NOTEBOOK_DIR}" && \
deactivate && \
# Cleanup
yum clean all && \
yum remove wget tar git -y && \
rm -rf /var/cache/yum && \
rm -rf "${WORKING_DIR}/graph-notebook" && \
rm -rf /root/.cache && \
rm -rf /root/.npm/_cacache && \
rm -rf /usr/share
cd /usr/share && \
rm -r $(ls -A | grep -v terminfo)

ADD "docker/Example-Remote-Server-Setup.ipynb" "${NOTEBOOK_DIR}/Example-Remote-Server-Setup.ipynb"
ADD ./docker/service.sh /usr/bin/service.sh
Expand Down
Loading