Skip to content

Commit

Permalink
Merge branch 'main' into autopep8_format_check_action
Browse files Browse the repository at this point in the history
  • Loading branch information
2byrds committed Aug 6, 2024
2 parents 0806518 + f7e0890 commit 79c9b9a
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: build-keria
build-keria:
@docker buildx build --platform=linux/amd64 --no-cache -f images/keria.dockerfile --tag weboftrust/keria:0.2.0-dev1 .
@docker buildx build --platform=linux/amd64 --no-cache -f images/keria.dockerfile --tag weboftrust/keria:0.2.0-dev3 .

publish-keria:
@docker push weboftrust/keria --all-tags
57 changes: 51 additions & 6 deletions images/keria.dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,55 @@
FROM weboftrust/keri:1.2.0-dev6
# Builder stage
FROM python:3.12-alpine3.19 as builder

WORKDIR /usr/local/var
# Install compilation dependencies
RUN apk --no-cache add \
bash \
alpine-sdk \
libffi-dev \
libsodium \
libsodium-dev

RUN mkdir keria
COPY . /usr/local/var/keria
SHELL ["/bin/bash", "-c"]

WORKDIR /usr/local/var/keria
# Install Rust for blake3 dependency build
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y

RUN pip install -r requirements.txt
WORKDIR /keria

RUN python -m venv venv
ENV PATH=/keria/venv/bin:${PATH}
RUN pip install --upgrade pip

# Copy in Python dependency files
COPY requirements.txt setup.py ./
# "src/" dir required for installation of dependencies with setup.py
RUN mkdir /keria/src
# Install Python dependencies
RUN . "$HOME/.cargo/env" && \
pip install -r requirements.txt

# Runtime stage
FROM python:3.12-alpine3.19

# Install runtime dependencies
RUN apk --no-cache add \
bash \
alpine-sdk \
libsodium-dev

WORKDIR /keria

# Copy over compiled dependencies
COPY --from=builder /keria /keria
# Copy in KERIA source files - enables near instantaneous builds for source only changes
RUN mkdir -p /usr/local/var/keri
ENV KERI_AGENT_CORS=${KERI_AGENT_CORS:-false}
ENV PATH=/keria/venv/bin:${PATH}

EXPOSE 3901
EXPOSE 3902
EXPOSE 3903

COPY src/ src/

ENTRYPOINT ["keria", "start", "--config-file", "demo-witness-oobis", "--config-dir", "./scripts"]
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

setup(
name='keria',
version='0.2.0-dev0', # also change in src/keria/__init__.py
version='0.2.0-dev3', # also change in src/keria/__init__.py
license='Apache Software License 2.0',
description='KERIA: KERI Agent in the cloud',
long_description="KERIA: KERI Agent in the cloud.",
Expand Down Expand Up @@ -75,14 +75,14 @@
],
python_requires='>=3.12.2',
install_requires=[
'hio>=0.6.12',
'keri>=1.2.0.dev8',
'mnemonic>=0.20',
'hio>=0.6.14',
'keri>=1.2.0.dev11',
'mnemonic>=0.21',
'multicommand>=1.0.0',
'falcon>=3.1.3',
'http_sfv>=0.9.8',
'dataclasses_json>=0.5.7',
'apispec>=6.3.0',
'apispec>=6.6.0',
],
extras_require={
# eg:
Expand Down
2 changes: 1 addition & 1 deletion src/keria/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
main package
"""

__version__ = '0.2.0-dev0' # also change in setup.py
__version__ = '0.2.0-dev3' # also change in setup.py

0 comments on commit 79c9b9a

Please sign in to comment.