Skip to content

Commit

Permalink
add rc2 to dockerimage path for enterprise registry, add mac os suppo…
Browse files Browse the repository at this point in the history
…rt for multiprocessing (#4)

* mac os support for multiprocessing

* add rc2 to enterprise dockerimage path
  • Loading branch information
mkolomeychenko authored Jan 18, 2022
1 parent afa85d7 commit 5bdf1d2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-push-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
push: true
tags: |
supervisely/agent:dev
${{ secrets.DOCKER_ENTERPRISE_REGISTRY }}/agent:dev
${{ secrets.DOCKER_ENTERPRISE_REGISTRY }}/rc2/agent:dev
build-args: |
LABEL_VERSION=agent:dev
LABEL_INFO=${{ env.LABEL_INFO }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-push-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ jobs:
tags: |
supervisely/agent:dev
supervisely/agent:${{ env.LABEL_VERSION }}
${{ secrets.DOCKER_ENTERPRISE_REGISTRY }}/agent:dev
${{ secrets.DOCKER_ENTERPRISE_REGISTRY }}/agent:${{ env.LABEL_VERSION }}
${{ secrets.DOCKER_ENTERPRISE_REGISTRY }}/rc2/agent:dev
${{ secrets.DOCKER_ENTERPRISE_REGISTRY }}/rc2/agent:${{ env.LABEL_VERSION }}
build-args: |
LABEL_VERSION=agent:${{ env.LABEL_VERSION }}
LABEL_INFO=${{ env.LABEL_INFO }}
Expand Down
1 change: 0 additions & 1 deletion agent/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import os
import sys
from dotenv import load_dotenv

from pathlib import Path

# only for convenient debug, has no effect in production
Expand Down
6 changes: 3 additions & 3 deletions agent/worker/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ def agent_connect_initially(self):
config = json.loads(docker_img_info).get("Config")
if config is None:
config = {}
self.logger.warn('Agent is running in debug VENV')
self.logger.warn('Docker container info unavailable, agent is running in debug VENV')

self.agent_info = {
'hardware_info': hw_info,
'agent_image': config.get("Image", ""),
'agent_version': config.get("Labels", {}).get("VERSION", ""),
'agent_image': config.get("Image", "docker.enterprise.supervise.ly/agent:6.3.0"), # for debug
'agent_version': config.get("Labels", {}).get("VERSION", "agent:6.3.0"), # for debug
'agent_image_digest': get_self_docker_image_digest()
}

Expand Down
3 changes: 3 additions & 0 deletions agent/worker/task_logged.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
import threading
import time
import multiprocessing
import platform
if platform.system() == 'Darwin':
multiprocessing.set_start_method("fork")
import concurrent.futures
import sys
import json
Expand Down
6 changes: 3 additions & 3 deletions debug.env
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ACCESS_TOKEN="c2msPZoGFl6B4gfjbwt5Y5OrrQ0uJvmr"
SERVER_ADDRESS="supervisely.private:38585"
ACCESS_TOKEN="in secret.env"
SERVER_ADDRESS="in secret.env"
AGENT_HOST_DIR="/Users/maxim/work/agent/data"
AGENT_ROOT_DIR="/Users/maxim/work/agent/data"
DOCKER_REGISTRY="in secret.env"
DOCKER_LOGIN="in secret.env"
DOCKER_PASSWORD="in secret.env"
LOG_LEVEL="DEBUG"
DISABLE_TELEMETRY="1"
# DISABLE_TELEMETRY="1"

0 comments on commit 5bdf1d2

Please sign in to comment.