Skip to content

Commit

Permalink
Merge pull request #212 from kjsanger/fix/docker-caching
Browse files Browse the repository at this point in the history
Fix Docker caching of Python builds
  • Loading branch information
kjsanger authored Aug 28, 2024
2 parents 21dd029 + ac4f59d commit fa4ca66
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,28 @@ RUN echo "deb [arch=amd64] https://packages.irods.org/apt/ $(lsb_release -sc) ma

WORKDIR /app

COPY . /app

# It's more practical to build from an iRODS client image and install recent Python
# than to build from a recent Python image and install iRODS clients.
ENV PYENV_ROOT="/app/.pyenv"

# Put PYENV first to ensure we use the pyenv-installed Python
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin"

RUN ./docker/install_pyenv.sh
COPY ./docker/install_pyenv.sh /app/docker/install_pyenv.sh

RUN /app/docker/install_pyenv.sh

RUN pyenv install "$PYTHON_VERSION"
RUN pyenv global "$PYTHON_VERSION"

COPY requirements.txt test-requirements.txt /app/

RUN pip install --no-cache-dir -r requirements.txt && \
pip install --no-cache-dir -r test-requirements.txt && \
pip install --no-cache-dir . && \
pip install --no-cache-dir -r test-requirements.txt

COPY . /app

RUN pip install --no-cache-dir . && \
git status && \
ls -al

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ repository = "https://github.com/wtsi-npg/partisan.git"

[build-system]
requires = ["setuptools>=41", "wheel", "setuptools-git-versioning>=2.0,<3"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
# Note: we are relying on setuptools' automatic package discovery, so no further
Expand Down

0 comments on commit fa4ca66

Please sign in to comment.