Skip to content

Commit

Permalink
build: Disable POW for local stack and Testnet resource provider (#207)
Browse files Browse the repository at this point in the history
* chore: Disable stack resource provider POW

* build: Add DISABLE_POW resource provider build arg
  • Loading branch information
bgins authored Jun 27, 2024
1 parent c762fc4 commit 76b8fd8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/testnet_deploy_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ jobs:
-t $ECR_REPOSITORY_RESOURCE_PROVIDER \
-f ./docker/resource-provider/Dockerfile \
--build-arg="network=testnet" \
--build-arg="disable_pow=true" \
.
docker tag $ECR_REPOSITORY_RESOURCE_PROVIDER:latest $ECR_REGISTRY/$ECR_REPOSITORY_RESOURCE_PROVIDER:latest
docker push $ECR_REGISTRY/$ECR_REPOSITORY_RESOURCE_PROVIDER:latest
Expand Down
5 changes: 3 additions & 2 deletions docker/resource-provider/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ WORKDIR /usr/src/app

# Build args
ARG NETWORK=testnet
ARG DISABLE_POW=false

# Default environment variables
ENV LOG_LEVEL=info
Expand Down Expand Up @@ -43,9 +44,9 @@ RUN echo "sleep 3" >> run
# Launch Bacalhau
RUN echo "/usr/local/bin/bacalhau serve --node-type compute,requester --peer none --private-internal-ipfs=false --job-selection-accept-networked &" >> run
# Launch Lilypad
RUN echo "/usr/local/bin/lilypad resource-provider --network ${NETWORK} &" >> run
RUN echo "/usr/local/bin/lilypad resource-provider --network ${NETWORK} --disable-pow ${DISABLE_POW} &" >> run
RUN echo "wait -n" >> run
RUN chmod +x run

# Run startup script when container starts
CMD ["/bin/bash", "./run"]
CMD ["/bin/bash", "./run"]
3 changes: 2 additions & 1 deletion stack
Original file line number Diff line number Diff line change
Expand Up @@ -207,14 +207,15 @@ function job-creator-docker-run() {

function resource-provider() {
echo "- Reminder to do doppler setup to project->resource-provider and config->dev"
doppler run --preserve-env -p resource-provider -c dev -- go run . resource-provider "$@" --network dev
doppler run --preserve-env -p resource-provider -c dev -- go run . resource-provider "$@" --network dev --disable-pow true
}

function resource-provider-docker-build() {
docker build \
-t resource-provider \
-f ./docker/resource-provider/Dockerfile \
--build-arg NETWORK=dev \
--build-arg DISABLE_POW=true \
.
}

Expand Down

0 comments on commit 76b8fd8

Please sign in to comment.