Skip to content
This repository has been archived by the owner on May 20, 2021. It is now read-only.

Migrate to pytezos 3.0.4 #8

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 11 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
__pycache__
*.pyc
*.pyo
*.pyd
.venv
.dockerignore
.gitignore
Dockerfile
LICENSE
README.md
.git
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,5 @@ dmypy.json
.pyre/

.idea/
.vscode
*.ipynb
20 changes: 15 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
FROM python:3.7-slim-buster

RUN apt update && \
apt install -y build-essential pkg-config libsodium-dev libsecp256k1-dev libgmp-dev && \
apt install -y build-essential pkg-config libsodium-dev libsecp256k1-dev libgmp-dev make curl && \
rm -rf /var/lib/apt/lists/*
RUN pip install notebook jupyter-client

RUN pip install poetry

RUN useradd -ms /bin/bash jupyter

RUN mkdir /home/jupyter/michelson-kernel
RUN mkdir /home/jupyter/notebooks
COPY . /home/jupyter/michelson-kernel/
RUN chown -R jupyter /home/jupyter/

USER jupyter
WORKDIR /home/jupyter
WORKDIR /home/jupyter/michelson-kernel
RUN poetry config virtualenvs.in-project true
RUN make install
RUN make post-install

RUN pip install --user pytezos>=2.5.3 michelson-kernel>=0.1.6
WORKDIR /home/jupyter/notebooks

EXPOSE 8888
ENTRYPOINT [ "jupyter", "notebook", "--port=8888", "--ip=0.0.0.0", "--no-browser", "--no-mathjax"]
ENTRYPOINT [ "/home/jupyter/michelson-kernel/.venv/bin/jupyter", "notebook", "--port=8888", "--ip=0.0.0.0", "--no-browser", "--no-mathjax"]
25 changes: 24 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
install:
poetry install

post-install:
poetry run python post-install.py

debug:
pip install . --force --no-deps --user
pip install . --force --no-deps

isort:
poetry run isort src

pylint:
poetry run pylint src || poetry run pylint-exit $$?

mypy:
poetry run mypy src

lint: isort pylint mypy

build:
poetry build

image:
docker build . -t michelson-kernel

publish:
python setup.py sdist
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: "3.8"
services:
notebook:
build: .
ports:
- 8888:8888
148 changes: 0 additions & 148 deletions michelson_kernel/kernel.py

This file was deleted.

Loading