octave-desktop
Docker image for Octave
10K+
This Docker image provides the Ubuntu 16.04 environment with X Windows with Octave 4.2.1 and Jupyter Notebook for Octave. The X Windows will display in your web browser in full-screen mode. You can use this Docker image on 64-bit Linux, Mac or Windows. It allows you to use the same programming environment regardless which OS you are running on your laptop or desktop.
Before you start, you need to first install Python and Docker on your computer by following the steps below.
If you use Linux or Mac, Python is most likely already installed on your computer, so you can skip this step.
If you use Windows, you need to install Python if you have not yet done so. The easiest way is to install Miniconda, which you can download at https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe. During installation, make sure you check the option to make Miniconda the system's default Python.
Download the Docker Community Edition for free at https://www.docker.com/community-edition#/download and then run the installer. Note that you need administrator's privilege to install Docker. After installation, make sure you launch Docker before proceeding to the next step.
Notes for Windows Users
Computer Management. Open up Local Users and Groups, select Groups, right click on docker-users in the list, and then click on Add to Group... to add your username to the group.Settings.... Go to Shared Drives tab and check the C drive.C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx. This is a major security risk because all your images and data can be accessed and modified by other Docker users on the same computer. If you are using a shared Windows computer, make sure you create a private folder such as C:\Users\YourUserName\Documents\Hyper-V\Virtual Hard Disks and then go to Advanced tab in Docker Settings, and change the Image and Volume VHD Location to this folder.Notes for Mac Users
Notes for Linux Users
docker package. You can use the package installer for your system to install docker. Note that on some system (e.g., OpenSUSE), you may need to run the following commands to start up docker after installing docker:sudo systemctl enable docker
sudo systemctl start docker
docker group. On Ubuntu, this is done by running the command:sudo adduser $USER docker
On other systems, try the following command.
sudo usermod -G docker -a $USER
After adding yourself to the docker group, you need to log out and log back in before you can use Docker.
To run the Docker image, first download the script octave_desktop.py
and save it to the working directory where you will store your codes and data. You can download the script using command line: On Windows, start Windows PowerShell, use the cd command to change to the working directory where you will store your codes and data, and then run the following command:
curl https://raw.githubusercontent.com/compdatasci/octave-desktop/master/octave_desktop.py -outfile octave_desktop.py
On Linux or Mac, start a terminal, use the cd command to change to the working directory, and then run the following command:
curl -s -O https://raw.githubusercontent.com/compdatasci/octave-desktop/master/octave_desktop.py
After downloading the script, you can start the Docker image using the command
python octave_desktop.py -p
This will download and run the Docker image and then launch your default web browser to show the desktop environment. The -p option is optional, and it instructs the Python script to pull and update the image to the latest version. The work directory by default will be mapped to the current working directory on your host.
If your source code is in a named Docker volume, e.g. myproject, you can mount the volume to the ~/project directory inside the container using the command
python octave_desktop.py -v myproject
and the work directory will be the data volume.
For additional command-line options, use the command
python octave_desktop.py -h
Besides using the Docker Image as an X-Windows desktop environment, you can also use it as a Jupyter-Notebook server with the
default web browser on your computer. Simply replace octave_desktop.py with octave_jupyter.py in the preceding commands. That is, on Windows run the commands
curl https://raw.githubusercontent.com/compdatasci/octave-desktop/master/octave_jupyter.py -outfile octave_jupyter.py
python octave_jupyter.py -p
or on Linux and Mac run the commands
curl -s -O https://raw.githubusercontent.com/compdatasci/octave-desktop/master/octave_jupyter.py
python octave_jupyter.py -p
in the directory where your Jupyter notebooks are stored.
After you have download the Docker image using the curl and python commands above, you can run the image offline without internet connection using the following command:
python octave_desktop.py
or
python octave_jupyter.py
in the directory where you ran the curl command above.
To stop the Docker image, press Ctrl-C twice in the terminal (or Windows PowerShell on Windows) on your host computer where you started the Docker image, and close the tab for the desktop in your web browser.
For the best experience, use VNC Viewer to connect to Docker image with the port and password displayed in the terminal output, which supports the full-screen mode. If you don't have the VNC viewer, you can also use the full-screen mode in a web browser.
When using a web browser, we recommend Google Chrome or Chromium browser, which have the same user interface. On Windows or Linux, you can enter full-screen mode by selecting the menu View --> "Full Screen" Alternatively, open the Chrome menu (the three vertical dots at the top right) and select the square to the far right of the Zoom buttons (the "+" and "-" buttons). To exit the full-screen mode, press the F11 key. On Mac, it behaves similarly except that the menu item is named Enter Full Screen instead of Full Screen, and the keyboard shortcut is Ctrl-Cmd-f instead of F11. You can also click on the green circle at the top-left corner of Google Chrome to enter and exit the full-screen mode. Note that in the full-screen mode, you need to disable Always Show Toolbar in Full Screen under the View menu of Google Chrome, and you can reveal the menu and the toolbar by sliding your mouse to the top of the display.
Alternatively, you can also use the "native" browsers on different platforms.
View --> "Enter Full Screen" menu. To exit the full-screen mode, press Ctrl-Cmd-f, or slide your mouse to the top of the display to enable the menus.Fullscreen button in the left sidebar of Docker desktop environment. However, this is not recommended for day-to-day use, because Firefox would exit this full-screen mode whenever you press Esc, which may happen quite often.If your Docker desktop environment started automatically in a non-recommended browser, you can copy and paste the URL into a recommended browser.
Settings (or Preferences for Mac) and then select the Advanced tab to adjust the settings.$HOME/.config, $HOME/.ssh, , $HOME/project, $HOME/shared and any other
directory that you might have mounted explicitly are persistent. Any change to files in other directories will be lost when the Docker container stops. Use $HOME/.config to store the configuration files of the desktop environment. $HOME/shared maps to the working directory on the host, and you are recommended to use it or a mounted project directory to store codes and data.$HOME/.ssh directory in the Docker container maps to the .ssh directory on your host computer. This is particularly convenient for you to use your ssh-keys for authentications with git repositories (such as github or bitbucket). To use your ssh keys, run the ssh-add in a terminal to add your keys to the ssh-agent.Clipboard box in the left toolbar, which is synced automatically with the clipboard of the Docker desktop. To copy from the Docker desktop to the host, first, select the text in the Docker desktop, and then go to the Clipboard box to copy. To copy from host to the Docker desktop, first, paste the text into the Clipboard box, and then paste the text in the Docker desktop.logout button in the lower-left corner of the Docker desktop,docker stop <Container ID> in a terminal on the host, and you can find the Container ID using the docker ps -a command.Content type
Image
Digest
Size
759.6 MB
Last updated
almost 6 years ago
docker pull compdatasci/octave-desktop:4.2.2