Skip to content
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
28 changes: 16 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
# This Dockerfile initiates a working environment that can be used to run deploy script
# After

FROM rockylinux:8
FROM python:3.11-bookworm

RUN dnf -y groupinstall "Development Tools"
RUN dnf -y install which
RUN dnf -y install python3.11
RUN dnf -y install gcc-gfortran
RUN dnf -y install git
RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
automake \
build-essential \
cmake \
gfortran \
git \
libhdf5-dev \
openssh-client \
&& rm -rf /var/lib/apt/lists/*

RUN python3.11 -m venv /tmp/deploy_env
RUN python3 -m venv /tmp/deploy_env
ENV PATH="/tmp/deploy_env/bin:$PATH"
ENV VIRTUAL_ENV="/tmp/deploy_env"
ENV UV_PROJECT_ENVIRONMENT="/tmp/deploy_env"

WORKDIR /work

COPY ./src ./src
COPY ./poetry.lock ./poetry.lock
COPY ./uv.lock ./uv.lock
COPY ./pyproject.toml ./pyproject.toml
COPY ./config.yaml ./config.yaml
# Poetry requires readme to exist
RUN touch ./README.md

Expand All @@ -27,7 +31,7 @@ RUN ssh-keyscan github.com >> /root/.ssh/known_hosts
RUN chmod 0700 /root/.ssh

RUN pip install --upgrade pip
RUN pip install poetry
RUN poetry install
RUN pip install uv
RUN uv sync

ENTRYPOINT ["/bin/bash","-c", "source /tmp/deploy_env/bin/activate; bash"]
35 changes: 35 additions & 0 deletions examples/full/phast.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
main-package: phast
entrypoint: bin/phast

packages:
- name: boost
version: 1.89.0
src:
type: git
url: https://github.com/boostorg/boost.git
ref: 1bed2b0712b2119f20d66c5053def9173c8462a5

build: |
git submodule update --init --recursive
export BOOST_ROOT="$out"
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$out"
make install

- name: phast
version: 3.8.6
depends: [ boost ]
src:
type: git
url: https://github.com/equinor/phast_usgs
ref: a37cd5f224302fa88a1c903f73d4490b5f4a235c

build: |
autoreconf -fi
./configure \
--with-boost="$boost" \
CPPFLAGS="-I/usr/include/hdf5/serial" \
LDFLAGS="-L/usr/lib/aarch64-linux-gnu/hdf5/serial"
make all
make check
make install
4 changes: 2 additions & 2 deletions src/deploy/package_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def __init__(
prefix: Path,
check_existence: bool = True,
) -> None:
self.prefix: Path = prefix
self.storepath: Path = prefix / ".store"
self.prefix: Path = prefix.resolve()
self.storepath: Path = self.prefix / ".store"
self.config: Config = config
buildmap = {x.name: x for x in config.packages}

Expand Down
Loading