Skip to content

Commit

Permalink
Docker: Python 3.9.1 runs natively on Apple M1 Macs
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss committed Dec 14, 2020
1 parent 5ebcad5 commit ea3eca7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions docker/Dockerfile.olbase
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH

RUN pyenv update && pyenv install 2.7.6
RUN pyenv update && pyenv install 3.8.6
RUN pyenv update && pyenv install 3.9.0
RUN pyenv global 2.7.6 3.8.6 3.9.0
RUN pyenv update && pyenv install 3.9.1
RUN pyenv global 2.7.6 3.8.6 3.9.1
RUN pyenv rehash

# Update Python 2's pip to match production (Jan 2020)
RUN python2 -m pip install --upgrade --disable-pip-version-check pip==19.3.1
# Install wheel before other requirements to reduce Docker build time.
RUN python3.8 -m pip install --upgrade pip wheel==0.35.1
RUN python3.9 -m pip install --upgrade pip wheel==0.35.1
RUN python3.8 -m pip install --upgrade pip wheel
RUN python3.9 -m pip install --upgrade pip wheel

USER root
# Add pyenv to root's bashrc as well
Expand Down
2 changes: 1 addition & 1 deletion docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ https://github.com/internetarchive/openlibrary/wiki/Deployment-Guide#ol-web1
docker-compose run --rm home make test

# Launch a temporary container on Python 3 using the local Infogami and then open in local webbrowser
# PYENV_VERSION can be set to: 2.7.6, 3.8.6, or 3.9.0
# PYENV_VERSION can be set to: 2.7.6, 3.8.6, or 3.9.1
docker-compose down && \
PYENV_VERSION=3.8.6 docker-compose -f docker-compose.yml -f docker-compose.infogami-local.yml up -d && \
docker-compose logs -f --tail=10 web
Expand Down

0 comments on commit ea3eca7

Please sign in to comment.