简体   繁体   English

ClearML(以前的 Trains)可以在本地服务器上工作吗?

[英]Can ClearML (formerly Trains) work a local server?

I am trying to start my way with ClearML (formerly known as Trains).我正在尝试从ClearML (以前称为 Trains)开始。

I see on the documentation that I need to have server running, either on the ClearML platform itself, or on a remote machine using AWS etc.我在 文档中看到我需要在 ClearML 平台本身或使用 AWS 等的远程机器上运行服务器。

I would really like to bypass this restriction and run experiments on my local machine, not connecting to any remote destination.我真的很想绕过这个限制并在我的本地机器上运行实验,而不是连接到任何远程目的地。

According to this I can install the trains-server on any remote machine, so in theory I should also be able to install it on my local machine, but it still requires me to have Kubernetes or Docker, but I am not using any of them. 据此,我可以在任何远程机器上安装trains-server ,所以理论上我也应该能够在我的本地机器上安装它,但它仍然需要我有 Kubernetes 或 Docker,但我没有使用它们中的任何一个.

Anyone had any luck using ClearML (or Trains, I think it's still quite the same API and all) on a local server?有人在本地服务器上使用 ClearML(或 Trains,我认为它仍然与 API 和所有)完全相同吗?

  • My OS is Ubuntu 18.04.我的操作系统是 Ubuntu 18.04。

Disclaimer: I'm a member of the ClearML team (formerly Trains)免责声明:我是 ClearML 团队的成员(以前称为 Trains)

I would really like to bypass this restriction and run experiments on my local machine, not connecting to any remote destination.我真的很想绕过这个限制并在我的本地机器上运行实验,而不是连接到任何远程目的地。

A few options:几个选项:

  1. The Clearml Free trier offers free hosting for your experiments, these experiment are only accessible to you, unless you specifically want to share them among your colleagues. Clearml 免费试用版为您的实验提供免费托管,这些实验仅供您访问,除非您特别想在您的同事之间分享它们。 This is probably the easiest way to get started .这可能是最简单的入门方法。
  2. Install the ClearML-Server basically all you need is docker installed and you should be fine.安装 ClearML-Server 基本上你只需要安装 docker 就可以了。 There are full instructions here , this is the summary: 这里有完整的说明,这是摘要:
echo "vm.max_map_count=262144" > /tmp/99-trains.conf
sudo mv /tmp/99-trains.conf /etc/sysctl.d/99-trains.conf
sudo sysctl -w vm.max_map_count=262144
sudo service docker restart

sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

sudo mkdir -p /opt/trains/data/elastic_7
sudo mkdir -p /opt/trains/data/mongo/db
sudo mkdir -p /opt/trains/data/mongo/configdb
sudo mkdir -p /opt/trains/data/redis
sudo mkdir -p /opt/trains/logs
sudo mkdir -p /opt/trains/config
sudo mkdir -p /opt/trains/data/fileserver

sudo curl https://raw.githubusercontent.com/allegroai/trains-server/master/docker-compose.yml -o /opt/trains/docker-compose.yml
docker-compose -f /opt/trains/docker-compose.yml up -d
  1. ClearML also supports full offline mode (ie no outside connection is made). ClearML 还支持完全离线模式(即不建立外部连接)。 Once your experiment completes, you can manually import the run to your server (either self hosted or free tier server)实验完成后,您可以手动将运行导入您的服务器(自托管或免费层服务器)
from clearml import Task
Task.set_offline(True)
task = Task.init(project_name='examples', task_name='offline mode experiment')

When the process ends you will get a link to a zip file containing the output of the entire offline session:当该过程结束时,您将获得一个指向 zip 文件的链接,该文件包含整个离线 session 的 output:

ClearML Task: Offline session stored in /home/user/.clearml/cache/offline/offline-2d061bb57d9e408a9420c4fe81e26ad0.zip

Later you can import the session with:稍后您可以使用以下命令导入 session:

from clearml import Task
Task.import_offline_session('/home/user/.clearml/cache/offline/offline-2d061bb57d9e408a9420c4fe81e26ad0.zip')

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM