Skip to content

Commit

Permalink
Merge pull request #96 from ethpandaops/switch-to-uv
Browse files Browse the repository at this point in the history
python go brrr : switch to uv
  • Loading branch information
parithosh authored Feb 16, 2024
2 parents 81e5ade + b7a23a9 commit 4469b95
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
11 changes: 8 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20 as builder
FROM golang:1.21 as builder
RUN git clone https://github.com/protolambda/eth2-testnet-genesis.git \
&& cd eth2-testnet-genesis \
&& go install . \
Expand All @@ -11,12 +11,17 @@ VOLUME ["/config", "/data"]
EXPOSE 8000/tcp
RUN apt-get update && \
apt-get install --no-install-recommends -y \
ca-certificates build-essential python3 python3-dev python3-pip gettext-base jq wget && \
ca-certificates build-essential python3 python3-dev python3-pip gettext-base jq wget curl && \
curl -LsSf https://astral.sh/uv/install.sh | sh && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

COPY apps /apps
RUN cd /apps/el-gen && pip3 install --break-system-packages -r requirements.txt

ENV PATH="/root/.cargo/bin:${PATH}"

RUN cd /apps/el-gen && uv venv && uv pip install -r requirements.txt
COPY --from=builder /go/bin/eth2-testnet-genesis /usr/local/bin/eth2-testnet-genesis
COPY --from=builder /go/bin/eth2-val-tools /usr/local/bin/eth2-val-tools
COPY --from=builder /go/bin/zcli /usr/local/bin/zcli
Expand Down
3 changes: 2 additions & 1 deletion apps/el-gen/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ruamel.yaml==0.17.16
web3==6.14.0
web3>=6.15.0
setuptools>=69.1.0
3 changes: 3 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ SERVER_PORT="${SERVER_PORT:-8000}"
WITHDRAWAL_ADDRESS="${WITHDRAWAL_ADDRESS:-0xf97e180c050e5Ab072211Ad2C213Eb5AEE4DF134}"

gen_shared_files(){
. /apps/el-gen/.venv/bin/activate
set -x
# Shared files
mkdir -p /data/custom_config_data
Expand All @@ -19,6 +20,7 @@ gen_shared_files(){
}

gen_el_config(){
. /apps/el-gen/.venv/bin/activate
set -x
if ! [ -f "/data/custom_config_data/genesis.json" ]; then
tmp_dir=$(mktemp -d -t ci-XXXXXXXXXX)
Expand All @@ -33,6 +35,7 @@ gen_el_config(){
}

gen_cl_config(){
. /apps/el-gen/.venv/bin/activate
set -x
# Consensus layer: Check if genesis already exists
if ! [ -f "/data/custom_config_data/genesis.ssz" ]; then
Expand Down

0 comments on commit 4469b95

Please sign in to comment.