简体   繁体   English

如何在没有互联网连接的服务器上安装自定义 OpenAI Gym 环境

[英]How to install a custom OpenAI Gym environment on a server with no internet connection

I am trying to install a custom OpenAI gym environment on a remote machine that has no internet.我正在尝试在没有互联网的远程机器上安装自定义 OpenAI 健身房环境

I transferred all the files from the master node to the remote machine.我将所有文件从主节点传输到远程机器。

Then tried to install the gym environment as follows:然后尝试安装gym环境如下:

(tf-gpu) [username@localhost gym-CartPole-bt-v0]$ pip install -e .
Obtaining file:///home/username/code/openai/gym-CartPole-bt-v0
Requirement already satisfied: gym in /home/username/miniconda3/envs/tf-gpu/lib/python3.7/site-packages (from gym-CartPole-BT==0.0.1) (0.16.0)
Requirement already satisfied: pyglet<=1.5.0,>=1.4.0 in /home/username/miniconda3/envs/tf-gpu/lib/python3.7/site-packages (from gym->gym-CartPole-BT==0.0.1) (1.4.10)
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f6acfdc9b50>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/cloudpickle/

...

ERROR: Could not find a version that satisfies the requirement cloudpickle~=1.2.0 (from gym->gym-CartPole-BT==0.0.1) (from versions: none)
ERROR: No matching distribution found for cloudpickle~=1.2.0 (from gym->gym-CartPole-BT==0.0.1)

I am not sure what cloudpickle is or why it needs to access the internet during this process.我不确定 cloudpickle 是什么或为什么它需要在此过程中访问互联网。

But I did check and I have a more recent version of cloudpickle installed:但我确实检查过,我安装了更新版本的 cloudpickle:

$ conda list
# packages in environment at /home/username/miniconda3/envs/tf-gpu:
#
# Name                    Version                   Build  Channel
...
cloudpickle               1.3.0                    pypi_0    pypi
...

Can anyone explain what is going on here and any ideas to resolve it?谁能解释这里发生了什么以及解决它的任何想法?

I went back to the master node and ran the following command and it seemed to change the cloudpickle version back:我回到主节点并运行以下命令,它似乎将 cloudpickle 版本改回了:

(tf-gpu) [username@hostname gym-CartPole-bt-v0]$ pip install gym
Requirement already satisfied: gym in /home/username/miniconda3/envs/tf-gpu/lib/python3.7/site-packages (0.16.0)
Requirement already satisfied: numpy>=1.10.4 in /home/username/miniconda3/envs/tf-gpu/lib/python3.7/site-packages (from gym) (1.18.1)
Requirement already satisfied: pyglet<=1.5.0,>=1.4.0 in /home/username/miniconda3/envs/tf-gpu/lib/python3.7/site-packages (from gym) (1.4.10)
Requirement already satisfied: six in /home/username/miniconda3/envs/tf-gpu/lib/python3.7/site-packages (from gym) (1.14.0)
Collecting cloudpickle~=1.2.0
  Using cached cloudpickle-1.2.2-py2.py3-none-any.whl (25 kB)
Requirement already satisfied: scipy in /home/username/miniconda3/envs/tf-gpu/lib/python3.7/site-packages (from gym) (1.4.1)
Requirement already satisfied: future in /home/username/miniconda3/envs/tf-gpu/lib/python3.7/site-packages (from pyglet<=1.5.0,>=1.4.0->gym) (0.18.2)
Installing collected packages: cloudpickle
  Attempting uninstall: cloudpickle
    Found existing installation: cloudpickle 1.3.0
    Uninstalling cloudpickle-1.3.0:
      Successfully uninstalled cloudpickle-1.3.0
Successfully installed cloudpickle-1.2.2

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

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