Skip to content

Commit

Permalink
devnet with market
Browse files Browse the repository at this point in the history
  • Loading branch information
LexLuthr committed Feb 18, 2025
1 parent 9ec0a6f commit 812496f
Show file tree
Hide file tree
Showing 29 changed files with 2,473 additions and 50 deletions.
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ executors:
golang:
docker:
# Must match GO_VERSION_MIN in project root
- image: cimg/go:1.22.8
- image: cimg/go:1.23
resource_class: medium+
golang-2xl:
docker:
# Must match GO_VERSION_MIN in project root
- image: cimg/go:1.22.8
- image: cimg/go:1.23
resource_class: 2xlarge
ubuntu:
docker:
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:
default: unit
description: Test suite name to report to CircleCI.
docker:
- image: cimg/go:1.22
- image: cimg/go:1.23
environment:
CURIO_HARMONYDB_HOSTS: yugabyte
LOTUS_HARMONYDB_HOSTS: yugabyte
Expand Down Expand Up @@ -244,7 +244,7 @@ jobs:
description: |
Arguments to pass to golangci-lint
docker:
- image: cimg/go:1.21
- image: cimg/go:1.23
resource_class: medium+
steps:
- checkout
Expand Down
4 changes: 2 additions & 2 deletions .github/image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## This image is used to github action runner for this repo
# Use the official Golang image as the base image
FROM golang:1.22-bullseye AS builder
FROM golang:1.23-bullseye AS builder

# Set the working directory inside the container
WORKDIR /app
Expand All @@ -23,7 +23,7 @@ RUN git submodule update --init
RUN go mod download

# Stage 2: Install Lotus binary
FROM ghcr.io/filecoin-shipyard/lotus-containers:lotus-v1.28.1-devnet AS lotus-test
FROM ghcr.io/filecoin-shipyard/lotus-containers:lotus-v1.32.0-rc1-devnet AS lotus-test

# Stage 3: Build the final image
FROM myoung34/github-runner AS curio-github-runner
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- main

env:
GO_VERSION: 1.22.8
GO_VERSION: 1.23

jobs:
ci-lint:
Expand Down
29 changes: 21 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#####################################
ARG LOTUS_TEST_IMAGE=curio/lotus-all-in-one:latest
FROM ${LOTUS_TEST_IMAGE} AS lotus-test
FROM golang:1.22.8-bullseye AS curio-builder
LABEL Maintainer = "Curio Development Team"
FROM golang:1.23-bullseye AS curio-builder
LABEL Maintainer="Curio Development Team"

RUN apt-get update && apt-get install -y ca-certificates build-essential clang ocl-icd-opencl-dev ocl-icd-libopencl1 jq libhwloc-dev

Expand Down Expand Up @@ -47,6 +47,15 @@ ARG CURIO_TAGS=""

RUN make build

####################################
FROM golang:1.23-bullseye AS piece-server-builder

RUN go install github.com/ipld/go-car/cmd/car@latest \
&& cp $GOPATH/bin/car /usr/local/bin/

RUN go install github.com/LexLuthr/piece-server@latest \
&& cp $GOPATH/bin/piece-server /usr/local/bin/

#####################################
FROM ubuntu:22.04 AS curio-all-in-one

Expand All @@ -69,10 +78,11 @@ RUN useradd -r -u 532 -U fc && \
echo "libnvidia-opencl.so.1" > /etc/OpenCL/vendors/nvidia.icd

# Environment setup
ENV FILECOIN_PARAMETER_CACHE=/var/tmp/filecoin-proof-parameters \
ENV FIL_PROOFS_PARAMETER_CACHE=/var/tmp/filecoin-proof-parameters \
LOTUS_MINER_PATH=/var/lib/lotus-miner \
LOTUS_PATH=/var/lib/lotus \
CURIO_REPO_PATH=/var/lib/curio
CURIO_REPO_PATH=/var/lib/curio \
CURIO_MK12_CLIENT_REPO=/var/lib/curio-client

# Copy binaries and scripts
COPY --from=lotus-test /usr/local/bin/lotus /usr/local/bin/
Expand All @@ -81,18 +91,21 @@ COPY --from=lotus-test /usr/local/bin/lotus-shed /usr/local/bin/
COPY --from=lotus-test /usr/local/bin/lotus-miner /usr/local/bin/
COPY --from=curio-builder /opt/curio/curio /usr/local/bin/
COPY --from=curio-builder /opt/curio/sptool /usr/local/bin/
COPY --from=piece-server-builder /usr/local/bin/piece-server /usr/local/bin/
COPY --from=piece-server-builder /usr/local/bin/car /usr/local/bin/

# Set up directories and permissions
RUN mkdir /var/tmp/filecoin-proof-parameters \
/var/lib/lotus \
/var/lib/lotus-miner \
/var/lib/curio && \
chown fc: /var/tmp/filecoin-proof-parameters /var/lib/lotus /var/lib/lotus-miner /var/lib/curio
/var/lib/curio \
/var/lib/curio-client && \
chown fc: /var/tmp/filecoin-proof-parameters /var/lib/lotus /var/lib/lotus-miner /var/lib/curio /var/lib/curio-client

# Define volumes
VOLUME ["/var/tmp/filecoin-proof-parameters", "/var/lib/lotus", "/var/lib/lotus-miner", "/var/lib/curio"]
VOLUME ["/var/tmp/filecoin-proof-parameters", "/var/lib/lotus", "/var/lib/lotus-miner", "/var/lib/curio", "/var/lib/curio-client"]

# Expose necessary ports
EXPOSE 1234 2345 12300 4701 32100
EXPOSE 1234 2345 12300 4701 32100 12310 12320

CMD ["/bin/bash"]
2 changes: 1 addition & 1 deletion GO_VERSION_MIN
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.22.8
1.23
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,12 @@ docker/curio:
--build-arg BUILD_VERSION=dev .
.PHONY: docker/curio

docker/devnet: $(lotus_build_cmd) docker/curio-all-in-one docker/lotus docker/lotus-miner docker/curio docker/yugabyte
docker/piece-server:
cd docker/piece-server && DOCKER_BUILDKIT=1 $(curio_docker_build_cmd) -t $(curio_docker_user)/piece-server-dev:dev \
--build-arg BUILD_VERSION=dev .
.PHONY: docker/piece-server

docker/devnet: $(lotus_build_cmd) docker/curio-all-in-one docker/lotus docker/lotus-miner docker/curio docker/piece-server
.PHONY: docker/devnet

devnet/up:
Expand Down
1 change: 1 addition & 0 deletions cmd/sptool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,6 @@ var toolboxCmd = &cli.Command{
Usage: "some tools to fix some problems",
Subcommands: []*cli.Command{
sparkCmd,
mk12Clientcmd,
},
}
Loading

0 comments on commit 812496f

Please sign in to comment.