Skip to content

Instantly share code, notes, and snippets.

@yuttie
Last active November 15, 2022 02:42
Show Gist options
  • Save yuttie/3675a872fc65ad5cca1d4c02e1afc356 to your computer and use it in GitHub Desktop.
Save yuttie/3675a872fc65ad5cca1d4c02e1afc356 to your computer and use it in GitHub Desktop.
Build Python 3.8 environment with poetry for M1 macOS
services:
pylec:
build: .
platform: linux/amd64
tty: true
ports:
- "3333:3333"
volumes:
- type: bind
source: .
target: /work
FROM --platform=linux/amd64 amd64/python:3.8-bullseye
RUN curl -sSL https://install.python-poetry.org | python3 -
ENV PATH="/root/.local/bin:$PATH"
WORKDIR /work
ADD pyproject.toml poetry.lock /work/
RUN poetry install
VOLUME /work
ENTRYPOINT poetry run jupyter notebook --allow-root --ip=0.0.0.0 --port=3333 --no-browser
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment