Skip to content

Commit

Permalink
Merge #36
Browse files Browse the repository at this point in the history
  • Loading branch information
elesiuta committed Jan 15, 2025
2 parents 980fec0 + 7b9a473 commit 4ccccce
Show file tree
Hide file tree
Showing 47 changed files with 1,222 additions and 330 deletions.
45 changes: 22 additions & 23 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,22 @@
{
"name": "Ubuntu",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
// "image": "mcr.microsoft.com/devcontainers/base:jammy",
"build": {
// Path is relative to the devcontainer.json file.
"dockerfile": "../devcontainer.Dockerfile"
},
"remoteUser": "root",
"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/opt/venv/bin/python"
}
}
},
"runArgs": ["--platform=linux/amd64"],
"features": {
"ghcr.io/devcontainers/features/python:1": {
"installTools": true,
"version": "os-provided"
}
}
// Built from https://github.com/inference-labs-inc/tensor-tools/blob/main/bittensor-devcontainer/Dockerfile
"image": "ghcr.io/inference-labs-inc/bittensor-devcontainer:latest",
// "build": {
// // Path is relative to the devcontainer.json file.
// "context": "..",
// "dockerfile": "Dockerfile"
// },
// "runArgs": ["--platform=linux/amd64"],

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},
// "features": {
// "ghcr.io/devcontainers/features/python:1": {
// "installTools": true,
// "version": "os-provided"
// }
// },

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
Expand All @@ -34,8 +27,14 @@
// "postCreateCommand": "uname -a",

// Configure tool-specific properties.
// "customizations": {},
"customizations": {
"vscode": {
"settings": {
"python.defaultInterpreterPath": "/home/vscode/.venv/bin/python"
}
}
},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
"remoteUser": "root"
}
30 changes: 30 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Code of Conduct

For Omron miners, validators, and operators of the subnet.

## General Principles

- All parties shall conduct activities with transparency and accountability.
- All parties shall not engage in any activity that could be construed as a conflict of interest.
- All parties shall report any potential issues or exploits to the owners and team members through the official bug bounty program.

> The official bug bounty program can be found at https://immunefi.com/bug-bounty/omron/
## Subnet Operators

- Shall conduct all development within the public `omron-subnet` repository.
- Shall not disclose any sensitive information about future updates to third parties.
- Shall make every reasonable effort to ensure that the subnet is secure and stable at all times.
- Shall provide support to the community as needed.
- Shall not give hints, tips, or tricks to any miners nor withhold information which may advantage any party.
- Shall put all pending or scheduled code updates in the official publicly available code repository before and leading up to their release.
- Shall provide reasonable timing between the release of pending updates and their official release, except for critical security updates.

## Miners

- Shall not collude with other miners or validators to manipulate the subnet.
- Shall not participate in activities that are directly adversarial to other miners or validators, such as DDoS or malicious requests.

## Validators

- Shall update their subnet codebases per the instructions provided by the owners and team members in a timely manner.
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
ENV PATH="/root/.cargo/bin:${PATH}"

# Install Jolt
ENV JOLT_VERSION=dd9e5c4bcf36ffeb75a576351807f8d86c33ec66
RUN cargo +${RUST_TOOLCHAIN} install --git https://github.com/a16z/jolt --rev ${JOLT_VERSION} --force --bins jolt
#ENV JOLT_VERSION=dd9e5c4bcf36ffeb75a576351807f8d86c33ec66
#RUN cargo +${RUST_TOOLCHAIN} install --git https://github.com/a16z/jolt --rev ${JOLT_VERSION} --force --bins jolt

# Install node et al.
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash && \
Expand Down Expand Up @@ -64,5 +64,9 @@ CMD ["-c", "import subprocess; \
subprocess.run(['/opt/omron/.venv/bin/python3', '/opt/omron/neurons/miner.py', '--help']); \
subprocess.run(['/opt/omron/.venv/bin/python3', '/opt/omron/neurons/validator.py', '--help']);" \
]
EXPOSE 4091/tcp
EXPOSE 8000/tcp
# Axon server
EXPOSE 8091/tcp
# API server
EXPOSE 8443/tcp
# Prometheus server
EXPOSE 9090/tcp
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ services:
image: ghcr.io/inference-labs-inc/omron:latest
restart: unless-stopped
ports:
- 8000:8000
- 8443:8443
- 9090:9090 # In case you use prometheus monitoring
volumes: # Update this path to your .bittensor directory
- {path_to_your_.bittensor_directory}:/root/.bittensor
labels:
Expand All @@ -151,7 +152,8 @@ services:
```console
docker run -d \
--name omron-validator \
-p 8000:8000 \
-p 8443:8443 \
-p 9090:9090 \
-v {path_to_your_.bittensor_directory}:/root/.bittensor \
--restart unless-stopped \
ghcr.io/inference-labs-inc/omron:latest \
Expand Down
5 changes: 5 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"dictionaryDefinitions": [],
"dictionaries": [],
"words": [
"alist",
"bittensor",
"blocktime",
"btcli",
Expand All @@ -16,6 +17,7 @@
"hexsha",
"incentivizes",
"Keypair",
"libudev",
"localnet",
"Mbps",
"metagraph",
Expand All @@ -24,11 +26,14 @@
"onnxruntime",
"Opentensor",
"pydantic",
"rustup",
"setdefaulttimeout",
"snarkjs",
"starlette",
"substrateinterface",
"subtensor",
"timespan",
"tlsv",
"uids",
"uvicorn",
"venv",
Expand Down
126 changes: 0 additions & 126 deletions devcontainer.Dockerfile

This file was deleted.

8 changes: 8 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ Instructions for configuring a PM2 ecosystem file which allows for streamlined s

[View PM2 Configuration →]

## [Prometheus and Grafana Configuration]

Instructions for configuring Prometheus and Grafana to monitor your validator.

[View Prometheus and Grafana Configuration →]

## [Versioning]

Information about Omron's versioning system and how to stay up-to-date with the latest releases.
Expand All @@ -60,6 +66,8 @@ Information about Omron's versioning system and how to stay up-to-date with the
[View mainnet instructions →]: ./running_on_mainnet.md
[View testnet instructions →]: ./running_on_testnet.md
[View local instructions →]: ./running_on_staging.md
[Prometheus and Grafana Configuration]: ./prometheus.md
[View Prometheus and Grafana Configuration →]: ./prometheus.md
[Versioning]: ./versioning.md
[View versioning →]: ./versioning.md
[← Back to home]: ../
4 changes: 3 additions & 1 deletion docs/command_line_arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ The below arguments are specific to validator software and have no effect on min
| `--enable-pow` | No | `False` | `True`, `False` | Whether on-chain proof of weights is enabled |
| `--pow-target-interval` | No | `1000` | Integer | The target block interval for committing proof of weights to the chain |
| `--ignore-external-requests` | No | `True` | `True`, `False` | Whether the validator should ignore external requests through it's API. |
| `--external-api-port` | No | `8000` | Integer | The port for the validator's external API. |
| `--external-api-port` | No | `8443` | Integer | The port for the validator's external API. |
| `--external-api-workers` | No | `1` | Integer | The number of workers for the validator's external API. |
| `--external-api-host` | No | `0.0.0.0` | String | The host for the validator's external API. |
| `--do-not-verify-external-signatures` | No | `False` | `True`, `False` | External PoW requests are signed by validator's (sender's) wallet. By default, these are checked to ensure legitimacy. This should only be disabled in controlled development environments. |
| `--prometheus-monitoring` | No | `False` | `True`, `False` | Whether to enable sering of metrics for Prometheus monitoring. |
| `--prometheus-port` | No | `9090` | Integer | The port for the Prometheus data source. |

## Built-in Arguments

Expand Down
Loading

0 comments on commit 4ccccce

Please sign in to comment.