Skip to content

Commit

Permalink
Merge pull request #75 from backend-developers-ltd/update-bittensor-lib
Browse files Browse the repository at this point in the history
Update bittensor lib
  • Loading branch information
mzukowski-reef authored Apr 26, 2024
2 parents 8dd9a06 + 4c3458c commit 0b8d30a
Show file tree
Hide file tree
Showing 65 changed files with 1,725 additions and 3,303 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/miner_cd_staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ jobs:
IMAGE_NAME="${DOCKER_REPO_NAME}:${TAG_VERSION}"
SHA_IMAGE_NAME="${DOCKER_REPO_NAME}:git-${GITHUB_SHA}"
cd "${BUILD_DIRECTORY}" && docker build --build-context compute-horde=../compute_horde -t "${IMAGE_NAME}" -f app/envs/prod/Dockerfile .
cd "${BUILD_DIRECTORY}" && \
docker build \
--build-context compute-horde=../compute_horde \
-t "${IMAGE_NAME}" \
--build-arg MINER_VERSION="${GITHUB_SHA}" \
-f app/envs/prod/Dockerfile .
docker image tag "${IMAGE_NAME}" "${SHA_IMAGE_NAME}"
Expand Down
766 changes: 250 additions & 516 deletions compute_horde/pdm.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions compute_horde/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ readme = "README.md"
requires-python = "==3.11.*"
dependencies = [
'pydantic < 2.0.0,>=1.7.4',
'bittensor == 6.8.2',
'bittensor@git+https://github.com/opentensor/bittensor@merge_cuda',
'websockets>=12.0,<13.0',
"more-itertools>=10.2.0",
]
Expand Down Expand Up @@ -105,4 +105,4 @@ showcontent = true
[[tool.towncrier.type]]
directory = "infrastructure"
name = "Infrastructure"
showcontent = true
showcontent = true
3 changes: 2 additions & 1 deletion executor/app/build-image.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash -eux
#!/bin/bash
set -eux -o pipefail

IMAGE_NAME="backenddevelopersltd/compute-horde-executor:v0-latest"
# Dockerfile assumes that build is run in the parent dir
Expand Down
3 changes: 2 additions & 1 deletion executor/app/publish-image.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash -eux
#!/bin/bash
set -eux -o pipefail

source ./build-image.sh
echo "$DOCKERHUB_PAT" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
Expand Down
3 changes: 2 additions & 1 deletion executor/bin/prepare-os.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh -eux
#!/bin/sh
# Copyright 2020, Reef Technologies (reef.pl), All rights reserved.
set -eux pipefail

DOCKER_BIN="$(command -v docker || true)"
DOCKER_COMPOSE_BIN="$(command -v docker-compose || true)"
Expand Down
3 changes: 2 additions & 1 deletion executor/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/sh -eux
#!/bin/sh
# Copyright 2020, Reef Technologies (reef.pl), All rights reserved.
set -eux pipefail

if [ ! -f ".env" ]; then
echo "\e[31mPlease setup the environment first!\e[0m";
Expand Down
3 changes: 2 additions & 1 deletion executor/letsencrypt_setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash -eux
#!/bin/bash
set -eux -o pipefail

RELPATH="$(dirname "$0")"
ABSPATH="$(realpath "$RELPATH")"
Expand Down
921 changes: 334 additions & 587 deletions executor/pdm.lock

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion miner/app/build-image.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash -eux
#!/bin/bash
set -eux -o pipefail

IMAGE_NAME="backenddevelopersltd/compute-horde-miner:v0-latest"
# Dockerfile assumes that build is run in the parent dir
Expand Down
5 changes: 4 additions & 1 deletion miner/app/envs/prod/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ ENV PYTHONPATH=/opt/pypackages/lib:$PYTHONPATH
COPY --from=base-image /root/src/ /root/src/
COPY --from=base-image /opt/pypackages/ /opt/pypackages/

ARG MINER_VERSION=notset
ENV MINER_VERSION=$MINER_VERSION

EXPOSE 8000

CMD ["./entrypoint.sh"]
CMD ["./entrypoint.sh"]
3 changes: 2 additions & 1 deletion miner/app/publish-image.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash -eux
#!/bin/bash
set -eux -o pipefail

source ./build-image.sh
echo "$DOCKERHUB_PAT" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
Expand Down
1 change: 0 additions & 1 deletion miner/app/src/compute_horde_miner/miner/admin_site.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.conf import settings

from django.contrib.admin import AdminSite


Expand Down
3 changes: 2 additions & 1 deletion miner/bin/prepare-os.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh -eux
#!/bin/sh
set -eux pipefail
# Copyright 2020, Reef Technologies (reef.pl), All rights reserved.

DOCKER_BIN="$(command -v docker || true)"
Expand Down
3 changes: 2 additions & 1 deletion miner/deploy.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh -eux
#!/bin/sh
set -eux pipefail
# Copyright 2020, Reef Technologies (reef.pl), All rights reserved.

if [ ! -f ".env" ]; then
Expand Down
18 changes: 0 additions & 18 deletions miner/envs/runner-staging/.env.template

This file was deleted.

6 changes: 0 additions & 6 deletions miner/envs/runner-staging/Dockerfile

This file was deleted.

77 changes: 0 additions & 77 deletions miner/envs/runner-staging/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions miner/envs/runner-staging/build-image.sh

This file was deleted.

140 changes: 0 additions & 140 deletions miner/envs/runner-staging/data/docker-compose.yml

This file was deleted.

11 changes: 0 additions & 11 deletions miner/envs/runner-staging/entrypoint.sh

This file was deleted.

4 changes: 0 additions & 4 deletions miner/envs/runner-staging/nginx/Dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions miner/envs/runner-staging/nginx/README.md

This file was deleted.

4 changes: 0 additions & 4 deletions miner/envs/runner-staging/nginx/build-image.sh

This file was deleted.

Loading

0 comments on commit 0b8d30a

Please sign in to comment.