I created a Docker image of a container for learning OpenAI Gym

Overview

I created it because I wanted to create a machine learning environment for Docker containers with the local VS Code that I'm used to. It was my first time to create a Docker image, so I was able to confirm the operation of Gym while crying for various errors. Released.

OpenAIGym_noVNC

I made it to run the gym environment on a command basis using Visual Studio CODE and check the operation with a browser.

function

--You can connect to the container (Ubuntu18.04) with ssh and check the GUI with a browser using noVNC. --Two users, root and user, are set. --run.sh can be set to share volumes on the local and container.

Build

build.sh


docker build --build-arg ROOT_PASSWORD=password -t gym_container:dev .

Set ROOT_PASSWORD to the password used when connecting to ssh.

Run build.sh in the terminal.

Execution command


$ sh build.sh

Run Run run.sh.

Execution command


$ sh run.sh

Connect to container via ssh

The ssh port is set to 2222 in run.sh.

Connect with ssh


$ ssh user@localhost -p 2222

Confirmation on the browser

The vnc port is set to 6081 in run.sh. Connect to localhost: 6081 with an HTML5-enabled browser.

Recommended Posts

I created a Docker image of a container for learning OpenAI Gym
I made a Docker image of SDAPS for Japanese
Created a Docker container image for an OpenLDAP server based on Fedora
I made a Docker container to run Maven
Build a container for Docker x Laravel phpMyAdmin
I tried running Ansible on a Docker container
Change the location folder of Docker image & container
[Introduction to Docker] Create a Docker image for machine learning and use Jupyter notebook
[RSpec] I wrote a test for uploading a profile image.
Build a docker container for a python simple web server
List of Docker commands that I often use (container operation)
Created a server-side for online card games [Table of Contents]
How to create a lightweight container image for Java apps
I tried running a Docker container on AWS IoT Greengrass 2.0
Create a Kibana container image for ARM64 (Raspberry Pi/Mac M1)
I tried to make a machine learning application with Dash (+ Docker) part2 ~ Basic way of writing Dash ~
Summary of steps for developing in Docker container with VS Code
I made a Ruby container image and moved the Lambda function
I took a look at the resources of Azure Container Instance
I tried deploying a Docker container on Lambda with Serverless Framework
Create a Docker Image for redoc-cli and register it on Docker Hub
Create a lightweight STNS Docker image
I created a PDF in Java.
Run React on a Docker container
A list of rawValues for UITextContentType.
Run PureScript on a Docker container
docker single container restart for myself
Create a container image for arm64 of Kibana and register it in GitHub Container Registry. Start Elastic Stack with Docker Compose on Raspberry Pi 4 (64bit)