Skip to content

Commit

Permalink
chore: experimental docker fix using jan's rocksdb
Browse files Browse the repository at this point in the history
  • Loading branch information
jansegre committed Feb 27, 2025
1 parent dbcff55 commit e863451
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# before changing these variables, make sure the tag $PYTHON-alpine$ALPINE exists first
# list of valid tags hese: https://hub.docker.com/_/python
ARG PYTHON=3.11
ARG DEBIAN=bullseye
ARG DEBIAN=bookworm

# stage-0: copy pyproject.toml/poetry.lock and install the production set of dependencies
FROM python:$PYTHON-slim-$DEBIAN as stage-0

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.10

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.10

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.11

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.11

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.12

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/

Check warning on line 7 in Dockerfile

View workflow job for this annotation

GitHub Actions / buildx python-3.12

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
ARG PYTHON
# install runtime first deps to speedup the dev deps and because layers will be reused on stage-1
RUN apt-get -qy update
RUN apt-get -qy install libssl1.1 graphviz librocksdb6.11
RUN apt-get -qy install libssl3 graphviz librocksdb7.8
# dev deps for this build start here
RUN apt-get -qy install libssl-dev libffi-dev build-essential zlib1g-dev libbz2-dev libsnappy-dev liblz4-dev librocksdb-dev cargo git pkg-config
# install all deps in a virtualenv so we can just copy it over to the final image
Expand All @@ -27,7 +27,7 @@ RUN poetry run pip install dist/hathor-*.whl
FROM python:$PYTHON-slim-$DEBIAN
ARG PYTHON
RUN apt-get -qy update
RUN apt-get -qy install libssl1.1 graphviz librocksdb6.11
RUN apt-get -qy install libssl3 graphviz librocksdb7.8
COPY --from=stage-0 /app/.venv/lib/python${PYTHON}/site-packages/ /usr/local/lib/python${PYTHON}/site-packages/
# XXX: copy optional BUILD_VERSION file using ...VERSIO[N] instead of ...VERSION* to ensure only one file will be copied
# XXX: also copying the README.md because we need at least one existing file
Expand Down
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ service_identity = "~21.1.0"
pexpect = "~4.8.0"
intervaltree = "~3.1.0"
structlog = "~22.3.0"
rocksdb = {git = "https://github.com/hathornetwork/python-rocksdb.git"}
rocksdb = {git = "https://github.com/jansegre/python-rocksdb.git"}
aiohttp = "~3.10.3"
idna = "~3.4"
setproctitle = "^1.3.3"
Expand Down

0 comments on commit e863451

Please sign in to comment.