[PYTHON] Run eclipse in Docker environment (noVNC)

Introduction

When using a library that I want to run on unix, such as a DNN library, in my case, I developed it by running a docker container that was built in an environment by connecting it to the ubuntu desktop or server with ssh (from a windows pc). There is no problem if you just run the program, but it was a little inconvenient if you wanted to debug. Processing that does not use a calculation library such as data preprocessing was implemented in windows, and the rest was implemented in vim etc., but I learned how to run a GUI application by running a vnc server with docker, so I tried using it I did.

Premise

server:

client:

Request:

Dockerfile

I referred to the Dockerfile of dorowu / ubuntu-desktop-lxde-vnc. (gitHub)

Correspondence to cuda

I will refer to dorowu's Dockerfile above, but I want to use cuda, so I will change the base image. Fortunately, dorowu uses ubuntu as the base image, so I just changed it to nvidia / cuda and it worked.

eclipse installation

Since eclipse only needs to be downloaded and unzipped, the following description has been added to the Dockerfile.

eclipse


ADD http://***/eclipse-***.tar.gz /tmp
RUN tar xavf /tmp/eclipse-* -C /opt/
RUN ln -s /opt/eclipse/eclipse /usr/bin

Start it from the terminal (because I have not added it to the start menu).

Java installation

Java is required to run eclipse. Especially for pydev, if java8 is not installed, it will not be usable even if the installation is completed normally (it will not be displayed in the menu etc.). For the time being, I put java8 of crackle.

java_install


RUN apt-add-repository ppa:webupd8team/java && apt-get update
# license
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections

RUN apt-get install -y --force-yes oracle-java8-installer
RUN apt-get install -y --force-yes oracle-java8-set-default

eclipse plugin

For example, if you put pydev, you really want to write it in the Dockerfile ... For the time being, I operated it with GUI and committed to image. Well, I wonder if the GUI is only used during development. Please let me know if there is a good way ... It may be good to copy the directory where eclipse is installed from the host side and share or the host side and build the image.

Introduction of development environment

Inherit the image created above and install each library. If you have an image that uses nvidia / cuda as the base (this), you should just change the FROM to this image.

vnc connection

In the image that I referred to this time, noVNC is introduced. This is an application that can be vnc from a browser (HTML5). I will try this for the time being. You should be able to connect using the client software, but it was relatively comfortable with the browser.

Recommended Posts

Run eclipse in Docker environment (noVNC)
Using venv in Windows + Docker environment [Python]
Introduction to docker Create ubuntu environment in ubuntu
Use WebDAV in a Portable Docker environment
Run PIFuHD in Windows + Anaconda + Git Bash environment
Hello World with gRPC / go in Docker environment
Building an environment that uses Python in Eclipse
Super easy! Python + Flask environment in Docker quickly
Build a Minecraft plugin development environment in Eclipse
[Docker] Create a jupyterLab (python) environment in 3 minutes!
How to run AutoGluon in Google Colab GPU environment
Environment construction: GCP + Docker
Japanese can be used with Python in Docker environment
virtualenvwrapper in windows environment
virtual environment in python
Run pandas-highcharts display_charts in an environment other than jupyter
Development environment in Python
How to use Docker to containerize your application and how to use Docker Compose to run your application in a development environment
Docker under proxy environment
Build a Python development environment in Eclipse (add HTML editor)
After enabling the python virtual environment in the batch file, run the python file
[CLPEX memo] Run DO Python API in COS installed environment
Use Anaconda in pyenv environment
Run automatic jobs in python
SSH restrictions in Linux environment
Run shell commands in python
Run Python unittests in parallel
Collaborate in a remote environment
Handle environment variables in Python
Pip install in proxy environment
Docker + Django + React environment construction
HTTP environment variables in Flask
Prepare python3 environment with Docker
Byobu crashes in pyenv environment
(Note) Django in Vagrant environment
Run background job in fabric
Run IPython Notebook on Docker
Run Amazon Linux 2 in VirtualBox
docker run --help Japanese translation
I want to run Rails with rails s even in vagrant environment
How to debug Dash (Flask) in Docker + VSCode + remote connection environment
Build and try an OpenCV & Python environment in minutes using Docker