diff --git a/docs/config/solana.mdx b/docs/config/solana.mdx index 44f8efee..7318bc76 100644 --- a/docs/config/solana.mdx +++ b/docs/config/solana.mdx @@ -89,9 +89,26 @@ resources: Starship uses the following defaults for Solana chains: -- **Image**: `ghcr.io/hyperweb-io/starship/solana-agave:v2.3.4` +- **Image**: `ghcr.io/hyperweb-io/starship/solana-agave-noavx:v2.3.4` - **Binary**: `solana-validator` - **Home Directory**: `/root/.solana` + +## Docker Desktop / Virtualization Compatibility + +Starship uses a custom-built Solana image (`solana-agave-noavx`) that compiles Solana from source without AVX (Advanced Vector Extensions) requirements. This ensures compatibility with: + +- Docker Desktop on macOS (including Apple Silicon) +- Virtualized environments that don't support AVX instructions +- Kubernetes clusters running on virtual nodes + +The no-AVX image provides the same functionality as the standard image but with broader hardware compatibility. If you're running on bare metal with AVX support and want maximum performance, you can override the image: + +```yaml +chains: + - id: solana + name: solana + image: ghcr.io/hyperweb-io/starship/solana-agave:v2.3.4 # Standard AVX-optimized image +``` - **Denomination**: `lamports` (base unit), `sol` (display unit) - **HD Path**: `m/44'/501'/0'/0'` - **Coin Type**: 501 diff --git a/starship/docker/chains/Dockerfile.solana-noavx b/starship/docker/chains/Dockerfile.solana-noavx new file mode 100644 index 00000000..9373c9bb --- /dev/null +++ b/starship/docker/chains/Dockerfile.solana-noavx @@ -0,0 +1,51 @@ +# Custom Dockerfile for Solana without AVX requirements +# This builds Solana from source to be compatible with Docker Desktop and virtualized environments + +FROM rust:1.75-bullseye + +LABEL org.opencontainers.image.source="https://github.com/hyperweb-io/starship" + +# Set up dependencies +ENV PACKAGES curl make bash jq sed git build-essential pkg-config libssl-dev libudev-dev + +# Install minimum necessary dependencies +RUN apt-get update --yes && \ + apt-get install $PACKAGES --no-install-recommends --yes && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /root + +ARG VERSION + +# Clone and build Solana from source without AVX requirements +RUN git clone https://github.com/anza-xyz/agave.git /opt/agave && \ + cd /opt/agave && \ + git checkout ${VERSION} && \ + # Set Rust flags to disable AVX and build for generic x86_64 + # This prevents the runtime AVX check from aborting the process + export RUSTFLAGS="-C target-cpu=generic -C target-feature=-avx -C target-feature=-avx2" && \ + # Build Solana without AVX optimizations + cargo build --release --bin agave-validator && \ + cargo build --release --bin solana && \ + cargo build --release --bin solana-keygen && \ + cargo build --release --bin solana-faucet && \ + cargo build --release --bin agave-ledger-tool && \ + cargo build --release --bin solana-genesis && \ + cargo build --release --bin solana-gossip && \ + # Install binaries to /usr/local/bin + cp target/release/agave-validator /usr/local/bin/ && \ + cp target/release/solana /usr/local/bin/ && \ + cp target/release/solana-keygen /usr/local/bin/ && \ + cp target/release/solana-faucet /usr/local/bin/ && \ + cp target/release/agave-ledger-tool /usr/local/bin/ && \ + cp target/release/solana-genesis /usr/local/bin/ && \ + cp target/release/solana-gossip /usr/local/bin/ && \ + # Clean up to reduce image size + cd / && rm -rf /opt/agave + +# Verify installation +RUN solana --version && agave-validator --version + +# Set the default command +CMD ["bash"] diff --git a/starship/docker/chains/versions.yaml b/starship/docker/chains/versions.yaml index a7fffacf..3bc8c210 100644 --- a/starship/docker/chains/versions.yaml +++ b/starship/docker/chains/versions.yaml @@ -166,6 +166,12 @@ chains: - v2.3.3 - v2.2.20 - v2.2.19 + - name: solana-agave-noavx + base: rust:1.75-bullseye + file: Dockerfile.solana-noavx + tags: + - v2.3.4 + - v2.3.3 - name: ethereum/client-go base: ethereum/client-go file: Dockerfile.base