Skip to content

Commit

Permalink
Merge pull request #125 from Datura-ai/main
Browse files Browse the repository at this point in the history
deploy executor
  • Loading branch information
pyon12 authored Dec 9, 2024
2 parents 00b61e0 + a67736c commit b2be880
Show file tree
Hide file tree
Showing 29 changed files with 996 additions and 1,673 deletions.
3 changes: 2 additions & 1 deletion datura/datura/requests/miner_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ class ExecutorSSHInfo(pydantic.BaseModel):
ssh_port: int
python_path: str
root_dir: str
port_range: str
port_range: str | None = None
port_mappings: str | None = None


class AcceptSSHKeyRequest(BaseMinerRequest):
Expand Down
15 changes: 12 additions & 3 deletions neurons/executor/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,22 @@ EXTERNAL_PORT=8001

SSH_PORT=2200

# NOTE: please use either RENTING_PORT_RANGE or RENTING_PORT_MAPPINGS, both are not allowed
# Note: If you are not using proxy and all ports are available publicly,
# then you don't have to set RENTING_PORT_RANGE and RENTING_PORT_MAPPINGS

# (optional) If your internal port and external port are THE SAME
# configure available ports for renting.
# define the ports comma separated or range with dash "-"
# Please define at least 2 ports
# example
# RENTING_PORT_RANGE="40000-65535"
# RENTING_PORT_RANGE="9001,9002,9003"
# Please define at least 2 ports
# Note: if all ports are available publicly, then you don't have to put this port range
RENTING_PORT_RANGE="40000-65535"

# (optional) If your internal port and external port are NOT THE SAME
# add an array of [internal_port, external_port] mappings
# example: if internal port 46681 is mapped to 56681 external port
# and internal port 46682 is mapped to 56682 external port, then
# RENTING_PORT_MAPPINGS="[[46681, 56681], [46682, 56682]]"

MINER_HOTKEY_SS58_ADDRESS=
2 changes: 1 addition & 1 deletion neurons/executor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ RUN mkdir -p /etc/docker
RUN mkdir -p /etc/nvidia-container-runtime
RUN mkdir -p /root/.ssh

LABEL version="3.2.0"
LABEL version="3.2.1"

CMD ["bash", "run.sh"]
2 changes: 1 addition & 1 deletion neurons/executor/Dockerfile.runner
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ COPY entrypoint.sh /entrypoint.sh

RUN chmod u+x /entrypoint.sh

LABEL version="3.2.0"
LABEL version="3.2.1"

ENTRYPOINT ["/entrypoint.sh"]
4 changes: 4 additions & 0 deletions neurons/executor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ You can change the ports for `INTERNAL_PORT`, `EXTERNAL_PORT`, `SSH_PORT` based
- Range Specification(`from-to`): Miners can specify a range of ports, such as 2000-2005. This means ports from 2000 to 2005 will be open for the validator to select.
- Specific Ports(`port1,port2,port3`): Miners can specify individual ports, such as 2000,2001,2002. This means only ports 2000, 2001, and 2002 will be available for the validator.
- Default Behavior: If no ports are specified, the validator will assume that all ports on the executor are available.
- **RENTING_PORT_MAPPINGS**: Internal, external port mappings. Use this env when you are using proxy in front of your executors and the internal port and external port can't be the same. You can ignore this env, if all ports are open or the internal and external ports are the same. example:
- if internal port 46681 is mapped to 56681 external port and internal port 46682 is mapped to 56682 external port, then RENTING_PORT_MAPPINGS="[[46681, 56681], [46682, 56682]]"

Note: Please use either **RENTING_PORT_RANGE** or **RENTING_PORT_MAPPINGS** and DO NOT use both of them if you have specific ports are available.


* Run project
Expand Down
Loading

0 comments on commit b2be880

Please sign in to comment.