FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add Pip cache to engine build; bump Poetry and speed up poetry instal… · splitgraph/sgr@12e05ac · GitHub

Repository navigation

Commit 12e05ac

Browse files
committed
Add Pip cache to engine build; bump Poetry and speed up poetry install by using pip first.
1 parent b68c29f commit 12e05ac

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎engine/Dockerfile‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# syntax = docker/dockerfile:experimental
2+
13
# Multistage Dockerfile to build the Splitgraph engine: because of all the compilation of
24
# FDWs/libraries needed, we have to download a few hundred MB of dev tooling which we don't
35
# need at runtime. So, we define a single "toolchain" image, multiple images that build various
@@ -188,7 +190,7 @@ RUN mkdir -p /splitgraph/splitgraph && touch /splitgraph/splitgraph/__init__.py
188190
COPY poetry.lock pyproject.toml README.md /splitgraph/
189191
RUN mkdir /build
190192
COPY ./engine/build_scripts/build_splitgraph.sh /build/
191-
RUN /build/build_splitgraph.sh
193+
RUN --mount=type=cache,id=pip-cache,target=/root/.cache/pip /build/build_splitgraph.sh
192194

193195
# Copy the actual Splitgraph code over at this point.
194196
COPY ./splitgraph /splitgraph/splitgraph
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1-
#!/bin/bash -e
1+
#!/bin/bash -ex
22

33
# Install the Splitgraph library and the layered querying foreign data wrapper.
44
cd /splitgraph
55

6-
export POETRY_VERSION=1.0.0
6+
export POETRY_VERSION=1.0.5
77

88
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python3.8
99

1010
# Install globally (otherwise we'll need to find a way to get Multicorn to see the venv)
1111
ln -s /usr/bin/python3.8 /usr/bin/python
1212
source $HOME/.poetry/env
1313
poetry config virtualenvs.create false
14+
15+
poetry export -f requirements.txt --without-hashes -o requirements.txt && sed -i "/^-e/d" requirements.txt
16+
pip install -r requirements.txt
1417
poetry install --no-dev

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL