Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prevent package caching in Docker images #288

Merged
merged 3 commits into from
Jan 17, 2024
Merged
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
3 changes: 2 additions & 1 deletion build/apiserver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM python:3.11-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y gcc libpq-dev curl
RUN apt update && apt install -y gcc libpq-dev curl && apt-get clean
ARG PIP_NO_CACHE_DIR=1
RUN python -m pip install psycopg2==2.9.6
RUN python -m pip install adiscstudies==0.11.0
RUN python -m pip install numba==0.57.0
Expand Down
1 change: 1 addition & 0 deletions build/build_scripts/development.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
FROM nadeemlab-development/spt-development-prereqs:latest
ARG WHEEL_FILENAME
ARG PIP_NO_CACHE_DIR=1
COPY pyproject.toml .
COPY spatialprofilingtoolbox spatialprofilingtoolbox
RUN python -m build
Expand Down
31 changes: 16 additions & 15 deletions build/build_scripts/development_prereqs.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
FROM ubuntu:22.04
RUN apt update && apt-get install -y apt-transport-https
RUN apt update && apt-get install -y apt-transport-https && apt-get clean
ARG DEBIAN_FRONTEND=noninteractive
RUN apt install software-properties-common -y
RUN apt install software-properties-common -y && apt-get clean
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt update
RUN apt-get install -y libpq-dev
RUN apt install openjdk-11-jdk -y
RUN apt install xxd -y
RUN apt install file -y
RUN apt-get install -y libpq-dev && apt-get clean
RUN apt install openjdk-11-jdk -y && apt-get clean
RUN apt install xxd -y && apt-get clean
RUN apt install file -y && apt-get clean
WORKDIR /usr/src/app
ENV PATH="/usr/src/app:$PATH"
RUN apt install curl -y
RUN curl -s https://get.nextflow.io | bash; if [[ "$(which nextflow)" == "" ]]; then echo "nextflow not really installed."; exit 1; fi;
RUN apt install python3.11 -y
RUN apt install python3.11-dev -y
RUN apt install python3.11-venv -y
RUN apt install python3.11-distutils
RUN apt install python3.11 -y && apt-get clean
RUN apt install python3.11-dev -y && apt-get clean
RUN apt install python3.11-venv -y && apt-get clean
RUN apt install python3.11-distutils && apt-get clean
ARG PIP_NO_CACHE_DIR=1
RUN ln -s /usr/bin/python3.11 /usr/bin/python
RUN curl -sS https://bootstrap.pypa.io/get-pip.py | python
RUN apt install gcc -y
RUN apt install postgresql-client -y
RUN apt-get install -y build-essential libssl-dev libffi-dev
RUN apt install gcc -y && apt-get clean
RUN apt install postgresql-client -y && apt-get clean
RUN apt-get install -y build-essential libssl-dev libffi-dev && apt-get clean
RUN python -m pip install -U pip
COPY README.md .
COPY pyproject.toml.unversioned .
RUN python -m pip install toml
RUN apt install libgdal-dev -y
RUN apt install libgdal-dev -y && apt-get clean
RUN python -c 'import toml; c = toml.load("pyproject.toml.unversioned"); print("\n".join(c["project"]["dependencies"]))' | python -m pip install -r /dev/stdin
RUN python -c 'import toml; c = toml.load("pyproject.toml.unversioned"); print("\n".join(c["project"]["optional-dependencies"]["all"]))' | python -m pip install -r /dev/stdin
RUN python -m pip install build
RUN python -m pip install twine
RUN apt install -y bc
RUN apt install -y bc && apt-get clean
RUN rm pyproject.toml.unversioned
CMD bash -c "echo 'available for commands'; while [ 0 -le 1 ]; do sleep 3600; echo 'sleep 3600... keep alive the container for availability for ongoing commands.'; done"
15 changes: 8 additions & 7 deletions build/db/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
FROM postgres:16.0-bookworm
WORKDIR /usr/src/app
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt upgrade -y
RUN apt install python3 -y
RUN apt install python3-dev -y
RUN apt install python3-venv -y
RUN apt install python3-pip -y
RUN apt install -y libpq-dev
RUN apt install -y libgdal-dev
ARG PIP_NO_CACHE_DIR=1
RUN apt update && apt upgrade -y && apt-get clean
RUN apt install python3 -y && apt-get clean
RUN apt install python3-dev -y && apt-get clean
RUN apt install python3-venv -y && apt-get clean
RUN apt install python3-pip -y && apt-get clean
RUN apt install -y libpq-dev && apt-get clean
RUN apt install -y libgdal-dev && apt-get clean
RUN python3 -m pip install --break-system-packages psycopg2==2.9.6
RUN python3 -m pip install --break-system-packages adiscstudies==0.11.0
RUN python3 -m pip install --break-system-packages numba==0.57.0
Expand Down
5 changes: 3 additions & 2 deletions build/ondemand/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
FROM python:3.11-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y gcc g++ libpq-dev
ARG PIP_NO_CACHE_DIR=1
RUN apt update && apt install -y gcc g++ libpq-dev && apt-get clean
WORKDIR /usr/src/app
RUN apt install -y libgdal-dev
RUN apt install -y libgdal-dev && apt-get clean
RUN python -m pip install psycopg2==2.9.6
RUN python -m pip install adiscstudies==0.11.0
RUN python -m pip install numba==0.57.0
Expand Down
2 changes: 1 addition & 1 deletion spatialprofilingtoolbox/apiserver/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""API service"""
__version__ = '0.12.0'
__version__ = '0.13.0'
2 changes: 1 addition & 1 deletion spatialprofilingtoolbox/db/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Database-related SPT functionality."""
__version__ = '0.10.0'
__version__ = '0.13.0'
2 changes: 1 addition & 1 deletion spatialprofilingtoolbox/ondemand/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""The fast cell counts service."""
__version__ = '0.12.0'
__version__ = '0.13.0'
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.17.5
0.17.6