Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
with:
file: src/templates/rpc/Dockerfile_rpc
context: .
tags: local/warnet-rpc:ci
tags: warnet/dev
cache-from: type=gha
cache-to: type=gha,mode=max
outputs: type=docker,dest=/tmp/warnet.tar
Expand Down
1 change: 1 addition & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,6 @@ source .venv/bin/activate

```bash
pip install --upgrade pip
pip install --require-hashes --no-deps --system --no-cache -r requirements.txt
pip install -e .
```
6 changes: 5 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ start:

minikube start --mount --mount-string="$PWD:/mnt/src"

# Build image in local registry and load into minikube
docker build -t warnet/dev -f src/templates/rpc/Dockerfile_rpc_dev . --load
minikube image load warnet/dev

# Setup k8s
kubectl apply -f src/templates/rpc/namespace.yaml
kubectl apply -f src/templates/rpc/rbac-config.yaml
Expand Down Expand Up @@ -87,4 +91,4 @@ installlogging:
./src/templates/k8s/install_logging.sh

connectlogging:
./src/templates/k8s/connect_logging.sh
./src/templates/k8s/connect_logging.sh
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ dynamic = ["version", "dependencies"]
warnet = "warnet.server:run_server"
warcli = "cli.main:cli"

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}

[tool.setuptools.packages.find]
where = ["src"]

Expand Down
529 changes: 479 additions & 50 deletions requirements.txt

Large diffs are not rendered by default.

13 changes: 11 additions & 2 deletions src/templates/rpc/Dockerfile_rpc
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
# Use an official Python runtime as the base image
FROM python:3.11-slim
FROM python:3.12-slim

# Install procps, which includes pgrep
RUN apt-get update && \
apt-get install -y procps openssh-client && \
rm -rf /var/lib/apt/lists/*

# Install `uv` packge installer (https://github.com/astral-sh/uv)
RUN pip install uv

# Set the working directory in the container
WORKDIR /root/warnet

# Get better caching by installing before copying code
COPY requirements.txt .
# Require hashes on requirements for secure installs
RUN uv pip install --require-hashes --no-deps --system --no-cache -r requirements.txt

# Copy the source directory contents into the container
COPY . /root/warnet
RUN pip install .
# Install Warnet scripts
RUN uv pip install --system .

# Make port 9276 available to the world outside this container
# Change the port if your server is running on a different port
Expand Down
5 changes: 4 additions & 1 deletion src/templates/rpc/Dockerfile_rpc_dev
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Use an official Python runtime as the base image
FROM python:3.11-slim
FROM python:3.12-slim

# Install procps, which includes pgrep
RUN apt-get update && \
apt-get install -y procps openssh-client && \
rm -rf /var/lib/apt/lists/*

# Install `uv` packge installer (https://github.com/astral-sh/uv)
RUN pip install uv

# Set the working directory in the container
WORKDIR /root/warnet

Expand Down
3 changes: 2 additions & 1 deletion src/templates/rpc/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ done
if check_setup_toml; then
echo "Installing package from ${SOURCE_DIR}..."
cd ${SOURCE_DIR}
pip install -e .
uv pip install --require-hashes --no-deps --system --no-cache -r requirements.txt
uv pip install -e .
fi

# Execute the CMD from the Dockerfile
Expand Down
4 changes: 2 additions & 2 deletions src/templates/rpc/warnet-rpc-statefulset-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ spec:
spec:
containers:
- name: warnet-rpc
imagePullPolicy: Always
image: bitcoindevproject/warnet-rpc:dev
imagePullPolicy: Never
image: warnet/dev
ports:
- containerPort: 9276
volumeMounts:
Expand Down