diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index f8ca743..9063ccb 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -1,4 +1,4 @@ -name: Tag +name: Release Docker image concurrency: group: splatter-server-tag-${{ github.ref_name }} @@ -9,10 +9,6 @@ on: tags: - "v*" -env: - AWS_REGION: ${{ vars.GLOBAL_COMMON_AWS_REGION }} - IMAGE_NAME: splatter-server - jobs: build-and-push: runs-on: ubuntu-24.04 @@ -27,25 +23,11 @@ jobs: docker system prune -af || true df -h - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v4 + - name: Log in to Docker Hub + uses: docker/login-action@v3 with: - aws-access-key-id: ${{ secrets.GLOBAL_COMMON_AWS_ACCESS_KEY }} - aws-secret-access-key: ${{ secrets.GLOBAL_COMMON_AWS_SECRET_ACCESS_KEY }} - aws-region: ${{ env.AWS_REGION }} - - - name: Log in to ECR - id: ecr - uses: aws-actions/amazon-ecr-login@v2 - - - name: Docker metadata - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ steps.ecr.outputs.registry }}/${{ env.IMAGE_NAME }} - tags: | - type=ref,event=tag - type=raw,value=latest + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -61,6 +43,6 @@ jobs: platforms: linux/amd64 cache-from: type=gha cache-to: type=gha,mode=max - tags: ${{ steps.meta.outputs.tags }} - - # Deployment is handled by ArgoCD reconciliation; no auto-sync on tag pushes. + tags: | + aukilabs/splatter-server:latest + aukilabs/splatter-server:${{ github.ref_name }} diff --git a/.gitignore b/.gitignore index 5464f50..29dcbe1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ +# Environment and secrets (use .env.example as template) +.env +*.env.local + # Vim [._]*.s[a-v][a-z] !*.svg # comment out if you don't need vector files diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..83dbcee --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,29 @@ +# Contributing to splatter-server + +Thank you for your interest in contributing. We welcome issues and pull requests. + +## How to contribute + +- **Bug reports and feature ideas:** Open an [issue](https://github.com/aukilabs/splatter-server/issues). +- **Code changes:** Open a pull request (PR) against `main`. Use a branch name that matches our CI (e.g. `feature/your-feature`, `bug/fix-description`, `chore/your-change`). + +## Development setup + +- **Rust (compute node):** See [server/rust/README.md](server/rust/README.md). Copy `server/rust/.env.example` to `server/rust/.env` and configure for local DDS/DMS if needed. +- **Docker:** From the repo root, `docker build -t splatter-server .` then run with `--env-file .env` as in the main [README](README.md). + +## Code standards + +- **Rust:** In `server/rust`, please run before pushing: + - `cargo fmt --all` + - `cargo clippy --workspace --all-targets --all-features -- -D warnings` + - `cargo test --workspace --all-features` +- CI runs the same checks on push; keep the pipeline green. + +## Pull request process + +1. Point your PR at the `main` branch. +2. Ensure CI passes (Rust format, clippy, tests). +3. Keep changes focused; link related issues where applicable. + +By contributing, you agree that your contributions will be licensed under the same [MIT License](LICENSE) that covers this project. diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..bd91c19 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Auki Network Limited + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 6a8fe71..60be944 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,15 @@ # splatter-server +Splatter compute node for the Auki Network: runs Gaussian splatting jobs (COLMAP + nerfstudio/splatfacto) as part of the reconstruction pipeline. + +## License + +This project is licensed under the [MIT License](LICENSE). + +## Contributing + +See [CONTRIBUTING.md](CONTRIBUTING.md) for how to report issues, open PRs, and run the Rust checks locally. + ## Docker ### Build @@ -9,6 +19,9 @@ docker build -t splatter-server . ``` ### Run + +Create a `.env` from `server/rust/.env.example` and set your DMS/DDS URLs and registration secret, then: + ```bash docker run --gpus all -p 8080:8080 --name splatter -d --env-file .env splatter-server ``` @@ -42,7 +55,7 @@ python3 run.py \ {job_root_path} ├── Frames │ ├── {images} -│ └── ... +│ └── ... ├── refined │ ├── nerfstudio-data │ │ └── {converted nerfstudio data from colmap} @@ -52,4 +65,4 @@ python3 run.py \ │ ├── splat_rot.splat # this is what needs to be uploaded to dmt │ └── splatfacto │ └── {splat torch model} -``` \ No newline at end of file +``` diff --git a/server/rust/.env.example b/server/rust/.env.example index 9dd8eca..3b25a09 100644 --- a/server/rust/.env.example +++ b/server/rust/.env.example @@ -1,7 +1,7 @@ -# Required by posemesh-compute-node -DMS_BASE_URL=https://dms.dev.aukiverse.com/v1 +# Required by posemesh-compute-node (replace with your DMS/DDS endpoints) +DMS_BASE_URL=https://dms.auki.network/v1 REQUEST_TIMEOUT_SECS=10 -DDS_BASE_URL=https://dds.dev.aukiverse.com +DDS_BASE_URL=https://dds.auki.network NODE_URL=https://localhost:8080 REG_SECRET=replace-with-dds-registration-secret SECP256K1_PRIVHEX=0000000000000000000000000000000000000000000000000000000000000000 diff --git a/server/rust/scripts/curl-create-hello-job.sh b/server/rust/scripts/curl-create-hello-job.sh index f12f0aa..32dcd93 100755 --- a/server/rust/scripts/curl-create-hello-job.sh +++ b/server/rust/scripts/curl-create-hello-job.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -DMS_BASE_URL=${DMS_BASE_URL:-https://dms.dev.aukiverse.com/v1} +DMS_BASE_URL=${DMS_BASE_URL:-https://dms.auki.network/v1} APP_JWT=${APP_JWT:-} DOMAIN_ID=${DOMAIN_ID:-} OUTPUTS_PREFIX=${OUTPUTS_PREFIX:-hello-demo/} @@ -9,7 +9,7 @@ MESSAGE=${MESSAGE:-Hello from curl-create-hello-job.sh} TASK_LABEL=${TASK_LABEL:-hello} STAGE=${STAGE:-hello} BILLING_UNITS=${BILLING_UNITS:-1} -INPUT_CID=${INPUT_CID:-} # https://domain.dev.aukiverse.com/api/v1/domains//data//data/ CAPABILITY="/splatter/colmap/v1" if [[ -z "$APP_JWT" ]]; then