Esempio n. 1
0
    def initialize(self):

        self.task_queue = multiprocessing.Manager().Queue()
        self.queue = multiprocessing.Manager().Queue()
        self.file_list = list()
        self.pixel = 50

        self.src_dir = "/data/deeplearning/dataset/training/data/local"
        self.temp_dir = "/data/deeplearning/dataset/training/data/local_temp"
        self.dest_dir = "/data/deeplearning/dataset/training/data/released_local"

        if not os.path.exists(self.src_dir):
            os.makedirs(self.src_dir)
        if not os.path.exists(self.temp_dir):
            os.makedirs(self.temp_dir)
        if not os.path.exists(self.dest_dir):
            os.makedirs(self.dest_dir)

        self.dest_scp_ip = "192.168.5.38"
        self.dest_scp_port = 22
        self.dest_scp_user = "******"
        self.dest_scp_passwd = "12345678"

        self.dest_ssh = None
        self.dest_scp = None
        self.dest_sftp = None
        if self.dest_scp_ip != host_ip:
            self.dest_ssh = create_ssh_client(server=self.dest_scp_ip,
                                              port=self.dest_scp_port,
                                              user=self.dest_scp_user,
                                              password=self.dest_scp_passwd)
            self.dest_scp = scp.SCPClient(self.dest_ssh.get_transport())
            self.dest_sftp = self.dest_ssh.open_sftp()

        self.logger = logging.getLogger("auto-training")
    def initialize(self):
        self.file_list = list()
        self.pixel = 50

        self.src_dir = global_variables.check_dir.value
        self.temp_dir = global_variables.check_dir.value + "_temp"
        self.dest_dir = global_variables.release_dir.value

        if not os.path.exists(self.src_dir):
            os.makedirs(self.src_dir)
        if not os.path.exists(self.temp_dir):
            os.makedirs(self.temp_dir)
        if not os.path.exists(self.dest_dir):
            os.makedirs(self.dest_dir)

        self.dest_scp_ip = global_variables.model_host.value
        self.dest_scp_port = global_variables.model_port.value
        self.dest_scp_user = global_variables.model_user.value
        self.dest_scp_passwd = global_variables.model_passwd.value

        self.dest_ssh = None
        self.dest_scp = None
        self.dest_sftp = None
        if self.dest_scp_ip != global_variables.model_host.value:
            self.dest_ssh = create_ssh_client(server=self.dest_scp_ip,
                                              port=self.dest_scp_port,
                                              user=self.dest_scp_user,
                                              password=self.dest_scp_passwd)
            self.dest_scp = scp.SCPClient(self.dest_ssh.get_transport())
            self.dest_sftp = self.dest_ssh.open_sftp()

        self.logger = logging.getLogger("auto-training")
Esempio n. 3
0
    def initialize(self):
        self.task_queue = multiprocessing.Manager().Queue()
        self.queue = multiprocessing.Manager().Queue()
        self.file_list = list()
        self.src_dir = "/data/deeplearning/dataset/training/models/released"
        self.dest_dir = "/data/deeplearning/dataset/training/models/prod"

        self.src_scp_ip = "192.168.5.38"
        self.src_scp_port = 22
        self.src_scp_user = "******"
        self.src_scp_passwd = "12345678"

        self.src_ssh = None
        self.src_scp = None
        self.src_sftp = None

        if self.src_scp_ip != host_ip:
            self.src_ssh = create_ssh_client(
                server=self.src_scp_ip,
                port=self.src_scp_port,
                user=self.src_scp_user,
                password=self.src_scp_passwd
            )
            self.src_scp = scp.SCPClient(self.src_ssh.get_transport())
            self.src_sftp = self.src_ssh.open_sftp()

        self.dest_scp_ip = "192.168.5.38"
        self.dest_scp_port = 22
        self.dest_scp_user = "******"
        self.dest_scp_passwd = "12345678"

        self.dest_ssh = None
        self.dest_scp = None
        self.dest_sftp = None
        if self.dest_scp_ip != host_ip:
            self.dest_ssh = create_ssh_client(
                server=self.dest_scp_ip,
                port=self.dest_scp_port,
                user=self.dest_scp_user,
                password=self.dest_scp_passwd
            )
            self.dest_scp = scp.SCPClient(self.dest_ssh.get_transport())
            self.dest_sftp = self.dest_ssh.open_sftp()
Esempio n. 4
0
    def __init__(self, _manager, *args, **kw):
        super(StartTrainingHandler, self).__init__(args, kw)

        self.task_queue = _manager.Queue()
        self.queue = _manager.Queue()
        self.file_list = list()

        self.src_dir = "/opt/gaosanyuan/lane_detect"
        self.dest_dir = "/data/deeplearning/dataset/training/models/released"

        self.src_scp_ip = "192.168.5.36"
        self.src_scp_port = 32
        self.src_scp_user = "******"
        self.src_scp_passwd = "12345678"

        self.src_ssh = None
        self.src_scp = None
        self.src_sftp = None

        if self.src_scp_ip != host_ip:
            self.src_ssh = create_ssh_client(server=self.src_scp_ip,
                                             port=self.src_scp_port,
                                             user=self.src_scp_user,
                                             password=self.src_scp_passwd)
            self.src_scp = scp.SCPClient(self.src_ssh.get_transport())
            self.src_sftp = self.src_ssh.open_sftp()

        self.dest_scp_ip = "192.168.5.38"
        self.dest_scp_port = 22
        self.dest_scp_user = "******"
        self.dest_scp_passwd = "12345678"

        self.dest_ssh = None
        self.dest_scp = None
        self.dest_sftp = None
        if self.dest_scp_ip != host_ip:
            self.dest_ssh = create_ssh_client(server=self.dest_scp_ip,
                                              port=self.dest_scp_port,
                                              user=self.dest_scp_user,
                                              password=self.dest_scp_passwd)
            self.dest_scp = scp.SCPClient(self.dest_ssh.get_transport())
            self.dest_sftp = self.dest_ssh.open_sftp()
Esempio n. 5
0
    def initialize(self):
        self.file_list = list()
        self.pixel = 50

        self.src_dir = "/data/deeplearning/dataset/training/data/released"
        self.temp_dir = "/data/deeplearning/dataset/training/data/released_temp"

        if not os.path.exists(self.src_dir):
            os.makedirs(self.src_dir)
        if not os.path.exists(self.temp_dir):
            os.makedirs(self.temp_dir)

        self.dest_dir = global_variables.release_dir.value

        # self.released_url = "http://192.168.5.31:23300/kts/runtime/tasks?"
        if not global_variables.krs_url.value.endswith("/"):
            self.krs_url = global_variables.krs_url.value + "/image/get?"
        else:
            self.krs_url = global_variables.krs_url.value + "image/get?"

        if not global_variables.release_url.value.endswith("/"):
            self.released_url = global_variables.release_url.value
        else:
            self.released_url = global_variables.release_url.value[:-1]

        self.dest_scp_ip = global_variables.model_host.value
        self.dest_scp_port = global_variables.model_port.value
        self.dest_scp_user = global_variables.model_user.value
        self.dest_scp_passwd = global_variables.model_passwd.value

        self.dest_ssh = None
        self.dest_scp = None
        self.dest_sftp = None
        if self.dest_scp_ip != host_ip:
            self.dest_ssh = create_ssh_client(server=self.dest_scp_ip,
                                              port=self.dest_scp_port,
                                              user=self.dest_scp_user,
                                              password=self.dest_scp_passwd)
            self.dest_scp = scp.SCPClient(self.dest_ssh.get_transport())
            self.dest_sftp = self.dest_ssh.open_sftp()

        self.logger = logging.getLogger("auto-training")
Esempio n. 6
0
    def initialize(self):
        self.file_list = list()
        self.pixel = 50

        self.src_dir = global_variables.check_dir.value
        self.temp_dir = global_variables.check_dir.value + "_temp"

        if not os.path.exists(self.src_dir):
            os.makedirs(self.src_dir)
        if not os.path.exists(self.temp_dir):
            os.makedirs(self.temp_dir)

        # self.dest_dir = "/data/deeplearning/dataset/kd/lane"
        #
        # self.dest_scp_ip = "192.168.5.36"
        # self.dest_scp_port = 22
        # self.dest_scp_user = "******"
        # self.dest_scp_passwd = "12345678"

        self.dest_dir = global_variables.release_dir.value
        self.dest_scp_ip = global_variables.model_host.value
        self.dest_scp_port = global_variables.model_port.value
        self.dest_scp_user = global_variables.model_user.value
        self.dest_scp_passwd = global_variables.model_passwd.value

        self.dest_ssh = None
        self.dest_scp = None
        self.dest_sftp = None
        if self.dest_scp_ip != host_ip:
            self.dest_ssh = create_ssh_client(server=self.dest_scp_ip,
                                              port=self.dest_scp_port,
                                              user=self.dest_scp_user,
                                              password=self.dest_scp_passwd)
            self.dest_scp = scp.SCPClient(self.dest_ssh.get_transport())
            self.dest_sftp = self.dest_ssh.open_sftp()

        self.logger = logging.getLogger("auto-training")