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.
server:
client:
Request:
I referred to the Dockerfile of dorowu / ubuntu-desktop-lxde-vnc
. (gitHub)
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.
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 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
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.
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.
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