How to install Ubuntu with Oracle VirtualBox

How to install Ubuntu with Oracle VirtualBox

This Ubuntu tutorial explains how to install Ubuntu with Oracle VirtualBox. What is VirtualBox? Why Ubuntu? Oracle VM VirtualBox is a cross-platform virtualization application. You can run Windows and Linux on your Mac, run Windows server on your Linux server or run Linux on your Windows PC

What is VirtualBox?

Oracle VM VirtualBox is a cross-platform virtualization application developed by Oracle Corporation. It allows users to virtually install operating systems on virtual hard disks such as Windows, macOS, Solaris and Linux.

As an example, you can run Windows and Linux on your Mac, run Windows server on your Linux server or run Linux on your Windows PC while running your other existing applications.

Disk space and memory are the only problems that you'll face when installing multiple virtual machines.

Why You’ll Need It
  • Oracle’s VirtualBox is easy to install and use.
  • It's free.
  • You can run and experience any operating system safely.
  • If you’re a developer, VirtualBox can be used as a tool for safely testing your own development projects in multiple OS environments.
  • It can run everywhere from small embedded systems to laptops.
  • It's good for testing and disaster recoverable as it can be easily copied, backed-up and transported between hosts.
VirtualBox Installation

VirtualBox can be downloaded here: VirtualBox Downloads

Why Ubuntu?
  • It's free.
  • Easy customization: The GNOME desktop environment helps you customize easily.
  • It's secure.
  • Ubuntu is open-source.
  • Friendly and supportive community.
  • Low system requirements.
  • According to FOSSBYTES, Ubuntu is the second best Linux distro for programming & developers [2019 Edition].
  • It's beginner friendly.
Setup for Ubuntu

First, open the VirtualBox. Then click "New" to create a virtual machine.

Fill the OS name as Ubuntu since we're installing it. Check the type as Linux and select version Ubuntu (64-bit).

NOTE: Select the amount of memory as you wish but don't add more than 50 percentage of your RAM.

Check the "Create a virtual hard disk now" so we can later define our Ubuntu OS virtual hard disk size.

Now, we want to select "VHD (Virtual Hard Disk)".

Next, we'll dynamically allocate storage on physical hard disk.

We want to specify our Ubuntu OS's size. Recommended size is 10 GB. You can increase more than that.

After creating a virtual hard disk you'll see Ubuntu in your dashboard.

Now, we have to set up the Ubuntu disk image file (.iso)

The Ubuntu disk image file can be downloaded here: Ubuntu OS download

To set up the Ubuntu disk image file, go to settings and follow these steps:

  1. Click "Storage".
  2. In storage devices, click "Empty".
  3. In attributes, click the disk image and "Choose Virtual Optical Disk File".
  4. Select the Ubuntu disk image file and open it.

Click OK.

Your Ubuntu OS is fully ready for installation in your VirtualBox. So let's start it!

NOTE: Ubuntu VirtualBox installation and actual OS installation steps may vary. This guide helps you to install Ubuntu in VirtualBox only.

Let's install Ubuntu!

Click Install Ubuntu.

Select your keyboard layout.

In "Updates and other software" section check the "Normal installation" and continue.

In "Installation type", check "Erase disk and install Ubuntu".

Click "Continue".

Choose your current location.

Now, set up your profile.

You'll see Ubuntu installation.

After the installation, restart it.

After logging in, you'll see Ubuntu desktop.

We have successfully installed Ubuntu in VirtualBox. It's ready to use for your future development projects.

Let's verify the installation.

Open your terminal (Press Ctrl+Alt+T) and type the below commands and check if they work.

  1. pwd: This will print the current working directory.
  2. ls: This will list all items in your current directory.

After checking those, power off your machine by using the following command.

poweroff

Conclusion

VirtualBox is free and is a great tool for running multiple OS in a single OS. Ubuntu has its benefits. If you're a beginner to Linux, I would recommend you to use Ubuntu as it's beginner friendly.

Please feel free to let me know if you have any questions.

Thank you for reading.

Happy Coding!

How to setting an ssh connection on a Virtualbox Ubuntu

How to setting an ssh connection on a Virtualbox Ubuntu

How To setting SSH connection to Ubuntu on Virtualbox. How to setting an ssh connection on a Virtualbox Ubuntu.

Create an Ubuntu Virtualbox

Create a new Virtual Machine and check Create a new virtual disk

Name your virtualmachine, select Linux as OS type and Ubuntu (64 bit) as linux version.

Set the virtual RAM at half of the your real RAM, in my case I have 8gb on my laptop, so i give to virtual machine 4gb

Create a new virtual disk:

Select the source for install your Ubuntu OS, select VDI (VirtualBox Disk Image)

Select Dynamic allocation:

Set the size of your virtual Hard Disk and click on create:

Start your Machine:

Select the iso image of ubuntu (You must download it from ubuntu official web site).

Install Ubuntu following the installation wizard:

After have installed Ubuntu, login your virtualmachine ubuntu with username and password inserted during the installation:

Install openssh-server

sudo apt-get update
sudo apt-get install openssh-server

stop your virtualmachine.

Set the net of your virtualmachine:

click on settings & net:

Select NAT as connection and click on advanced, and set as in the picture below.

Click on port forwarding:

and set the SSH parameter:

Name: SSH

Protocol: TCP

Host IP: 127.0.0.1

Host Port: 2222

IP Guest: Empty

Port Guest: 22

Start your Virtual Machine:

When your VM is started, open your terminal and try to connect:

ssh [email protected] -p 2222

now you shoud be inside your virtualmachine.

Problems and Possible Solutions:

If you can’t connect try to disable or change settings to ubuntu firewall:

sudo ufw disable

or try to connect to the ip of VM:

click on global tools:

Click on create:

Back to Settings > Network and select adapter 1

Select Adapter only Host.

go inside the VM and get the ip number with ifconfig and get ip address:

ifconfig

In my case the ip is 192.168.56.101

now from terminal I try to connect in ssh to the ip 192.168.56.101

ssh [email protected]

30s ad

Vue.js Essentials - 3 Course Bundle

Sıfırdan İleri Seviye Vue.JS Eğitimi ve Uygulama Geliştirme

Vue.js 2 Basics in just 1 hour FREE

Programador FullStack JS Vue Node: Proj Galeria Vídeo e CRUD

Learn by Doing: Vue JS 2.0 the Right Way

How to setup TensorFlow on Ubuntu

How to setup TensorFlow on Ubuntu

How to setup TensorFlow on Ubuntu - This tutorial will help you set up TensorFlow 1.12 on Ubuntu 16.04 with a GPU using Docker and nvidia-docker.

TensorFlow is one of the most popular deep-learning libraries. It was created by Google and was released as an open-source project in 2015. TensorFlow is used for both research and production environments. Installing TensorFlow can be cumbersome. The difficulty varies based on your environment constraints, and more when you’re a data scientist that just wants to build your neural networks.

When using TensorFlow on GPU — setting up requires a few steps. In the following tutorial, we will go over the process required to set up TensorFlow.


You may also like:5 TensorFlow and ML Courses for Programmers


Requirements:

Step 1 — Prepare your environment with Docker and Nvidia-Docker

Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. What exactly is a container? Containers allow data scientists and developers to wrap up an environment with all of the parts it needs — such as libraries and other dependencies — and ship it all out in one package.

To use docker with GPUs and to be able to use TensorFlow in your application, you’ll need to install Docker with Nvidia-Docker. If you already have those installed, move to the next step. Otherwise, you can follow our previous guide to installing nvidia docker.

Prerequisites: Step 2 — Dockerfile

Docker can build images (environments) automatically by reading the instructions from a Dockerfile. A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.

In our case, those commands will describe the installation of Python 3.6, CUDA 9 and CUDNN 7.2.1 — and of course the installation of TensorFlow 1.12 from source.

For this environment, we will use the following Dockerfile

FROM nvidia/cuda:9.0-base-ubuntu16.04

RUN apt-get update && apt-get install -y --no-install-recommends \
        build-essential \
        cuda-command-line-tools-9-0 \
        cuda-cublas-dev-9-0 \
        cuda-cudart-dev-9-0 \
        cuda-cufft-dev-9-0 \
        cuda-curand-dev-9-0 \
        cuda-cusolver-dev-9-0 \
        cuda-cusparse-dev-9-0 \
        curl \
        git \
        libcudnn7=7.2.1.38-1+cuda9.0 \
        libcudnn7-dev=7.2.1.38-1+cuda9.0 \
	libnccl2=2.4.2-1+cuda9.0 \
	libnccl-dev=2.4.2-1+cuda9.0 \
        libcurl3-dev \
        libfreetype6-dev \
        libhdf5-serial-dev \
        libpng12-dev \
        libzmq3-dev \
        pkg-config \
        rsync \
        software-properties-common \
        unzip \
        zip \
        zlib1g-dev \
        wget \
        && \
    rm -rf /var/lib/apt/lists/* && \
    find /usr/local/cuda-9.0/lib64/ -type f -name 'lib*_static.a' -not -name 'libcudart_static.a' -delete && \
    rm /usr/lib/x86_64-linux-gnu/libcudnn_static_v7.a

# install python 3.6 and pip

RUN apt-get update
RUN apt-get install -y software-properties-common vim
RUN add-apt-repository ppa:jonathonf/python-3.6
RUN apt-get update

RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv
RUN apt-get install -y git

RUN apt-get update && \
        apt-get install nvinfer-runtime-trt-repo-ubuntu1604-4.0.1-ga-cuda9.0 && \
        apt-get update && \
        apt-get install libnvinfer4=4.1.2-1+cuda9.0 && \
        apt-get install libnvinfer-dev=4.1.2-1+cuda9.0

RUN python3.6 -m pip install pip --upgrade
RUN python3.6 -m pip install wheel 
RUN python3.6 -m pip install six numpy wheel mock
RUN python3.6 -m pip install keras_applications
RUN python3.6 -m pip install keras_preprocessing

RUN ln -s /usr/bin/python3.6 /usr/bin/python


# Set up Bazel.

# Running bazel inside a `docker build` command causes trouble, cf:
#   https://github.com/bazelbuild/bazel/issues/134
# The easiest solution is to set up a bazelrc file forcing --batch.
RUN echo "startup --batch" >>/etc/bazel.bazelrc
# Similarly, we need to workaround sandboxing issues:
#   https://github.com/bazelbuild/bazel/issues/418
RUN echo "build --spawn_strategy=standalone --genrule_strategy=standalone" \
    >>/etc/bazel.bazelrc
# Install the most recent bazel release.
ENV BAZEL_VERSION 0.15.0
WORKDIR /
RUN mkdir /bazel && \
    cd /bazel && \
    curl -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36" -fSsL -O https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \
    curl -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36" -fSsL -o /bazel/LICENSE.txt https://raw.githubusercontent.com/bazelbuild/bazel/master/LICENSE && \
    chmod +x bazel-*.sh && \
    ./bazel-$BAZEL_VERSION-installer-linux-x86_64.sh && \
    cd / && \
    rm -f /bazel/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh




# Download and build TensorFlow.
WORKDIR /tensorflow
RUN git clone --branch=r1.12 --depth=1 https://github.com/tensorflow/tensorflow.git .

# Configure the build for our CUDA configuration.
ENV CI_BUILD_PYTHON python3.6
ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH
ENV TF_NEED_CUDA 1
ENV TF_NEED_TENSORRT 1
ENV TF_CUDA_COMPUTE_CAPABILITIES=3.5,5.2,6.0,6.1,7.0
ENV TF_CUDA_VERSION=9.0
ENV TF_CUDNN_VERSION=7

RUN ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 && \
    LD_LIBRARY_PATH=/usr/local/cuda/lib64/stubs:${LD_LIBRARY_PATH} \
    tensorflow/tools/ci_build/builds/configured GPU \
    bazel build -c opt --copt=-mavx --config=cuda \
	--cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" \
        tensorflow/tools/pip_package:build_pip_package && \
    rm /usr/local/cuda/lib64/stubs/libcuda.so.1 && \
    bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/pip && \
    pip --no-cache-dir install --upgrade /tmp/pip/tensorflow-*.whl && \
    rm -rf /tmp/pip && \
    rm -rf /root/.cache
# Clean up pip wheel and Bazel cache when done.

WORKDIR /root

# TensorBoard
EXPOSE 6006

Step 3 — Running Dockerfile

To build the image from the Dockerfile, simply run the docker build command. Keep in mind that this build process might take a few hours to complete. We recommend using nohup utility so that if your terminal hangs — it will still run.

$ docker build -t deeplearning -f Dockerfile

This should output the setup process and should end with something similar to:

>> Successfully built deeplearning (= the image ID)

Your image is ready to use. To start the environment, simply type in the below command. But, don’t forget to replace your image id:

$ docker run --runtime=nvidia -it deeplearning /bin/bashStep 4 — Validating TensorFlow & start building!

Validate that TensorFlow is indeed running in your Dockerfile

$ python
import tensorflow as tf
sess = tf.Session(config=tf.ConfigProto(log_device_placement=True))
2019-02-23 07:34:14.592926: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports 
instructions that this TensorFlow binary was not compiled to use: AVX2 FMA2019-02-23 07:34:17.452780: I 
tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:964] successful NUMA
node read from SysFS had negative value (-1), but there must be at leastone NUMA node, so returning NUMA node zero
2019-02-23 07:34:17.453267: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 0 with 
properties: 
name: Tesla K80 major: 3 minor: 7 memoryClockRate(GHz): 0.8235pciBusID: 0000:00:1e.0
totalMemory: 11.17GiB freeMemory: 11.10GiB
2019-02-23 07:34:17.453306: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu
devices: 0
2019-02-23 07:34:17.772969: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect
StreamExecutor with strength 1 edge matrix:
2019-02-23 07:34:17.773032: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:988]      0
2019-02-23 07:34:17.773054: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0:   N
2019-02-23 07:34:17.773403: I
tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow
device (/job:localhost/replica:0/task:0/device:GPU:0 with 10757 MB memory)
-> physical GPU (device: 0, name: Tesla K80, pci bus id: 0000:00:1e.0,
compute capability: 3.7)
Device mapping:
/job:localhost/replica:0/task:0/device:XLA_CPU:0 -> device: XLA_CPU device
/job:localhost/replica:0/task:0/device:XLA_GPU:0 -> device: XLA_GPU device
/job:localhost/replica:0/task:0/device:GPU:0 -> device: 0, name: Tesla K80,
pci bus id: 0000:00:1e.0, compute capability: 3.7
2019-02-23 07:34:17.774289: I
tensorflow/core/common_runtime/direct_session.cc:307] Device mapping:
/job:localhost/replica:0/task:0/device:XLA_CPU:0 -> device: XLA_CPU device
/job:localhost/replica:0/task:0/device:XLA_GPU:0 -> device: XLA_GPU device
/job:localhost/replica:0/task:0/device:GPU:0 -> device: 0, name: Tesla K80, pci bus id: 0000:0

Congrats! Your new TensorFlow environment is set up and ready to start training, testing and deploying your deep learning models!

Conclusion

Tensorflow has truly disrupted the machine learning world by offering a solution to build production-ready models at scale. But Tensorflow is not always the most user-friendly. It can be difficult to smoothly incorporate into your machine learning pipeline. cnvrg.io data science platform leverages Tensorflow and other open-source tools so that data scientists can focus on the magic — the algorithms. You can find more tutorials on how to easily leverage open-source tools like TensorflowHow to set up Kubernetes for your machine learning workflows, and How to run Spark on Kubernetes. Finding simple ways to integrate these useful tools will get your models closer to production.

Further Reading

How To Set Up Django with Postgres, Nginx, and Gunicorn on Ubuntu 16.04

How To Install Python 3 and Set Up a Programming Environment on Ubuntu 18.04

How To Set Up Jupyter Notebook with Python 3 on Ubuntu 18.04

Originally published by*** *yochze **at towardsdatascience.com


Thanks for reading :heart: If you liked this post, share it with all of your programming buddies! Follow me on Facebook | Twitter

Ubuntu 20.04 Release!

Ubuntu 20.04 Release!

With the Ubuntu 19.10 release successfully done, attention turns to the next major update: Ubuntu 20.04 LTS, which is due to be released on April 23, 2020.

With the Ubuntu 19.10 release successfully done, attention turns to the next major update: Ubuntu 20.04 LTS, which is due to be released on April 23, 2020.

This early in the release cycle — there aren’t even any daily builds yet — there isn’t an awful lot of information to go on, and few concrete plans are in place.

But we do know when Ubuntu 20.04 is due for release, how long it’ll be supported for, and even some early details on what it’s likely to include

So read on to learn more details on key Ubuntu 20.04 LTS features, changes and improvements, more of which will be added to this post as and when they are revealed.

Ubuntu 20.04 ‘Focal Fossa’

The Ubuntu 20.04 codename is ‘Focal Fossa’.

This is a fitting moniker in many respects. The word ‘Focal’ means ‘centre point’ or ‘most important part’, while Fossa (as fans of the film Madagascar will know) is a cat-like predator native to the island of Madagascar.

Ergo Ubuntu 20.04 is being signposted as both an important and successful update.

Ubuntu 20.04 is the next long-term support (LTS) release of Ubuntu, and follows on from Ubuntu 18.04 LTS launched back in 2018 (and supported until 2023)

Every LTS release is supported for 5 years on the desktop and server.

Notable, this release will be supported for 10 years as an ‘extended maintenance release’ (ESM). ESM status is not free and is tailored towards businesses, industry and enterprise customers of Ubuntu Advantage.

Ubuntu 20.04 Release Date

The Ubuntu 20.04 release date is April 23, 2020.

This is the date listed on both Launchpad (where Ubuntu development takes place) and echoed by the release schedule for Ubuntu 20.04 on the Ubuntu wiki.

Other important milestones throughout the Focal Fossa development cycle include:

  • Testing week: January 9, 2020
  • UI Freeze: March 19, 2020
  • Ubuntu 20.04 Beta: April 2, 2020
  • Kernel Freeze: April 9, 2020
  • Release Candidate: April 16, 2020
    One important milestone (not yet pencilled in) will be the first Ubuntu 20.04 point release. Why a point release? Because that’s when users of Ubuntu 18.04 LTS get notified of the new LTS and offered the chance to upgrade to it.
Planned Ubuntu 20.04 Features

Tradition dictates that Ubuntu LTS releases are relatively conservative when it comes to changes and new features, i.e. don’t expect dramatic changes in Ubuntu 20.04.

That’s not to say there won’t be any new features or notable tweaks, it’s just that every nut and bolt of an LTS release is carefully evaluated prior to inclusion on the basis of how it might affect the overall stability and maintenance of the release.

Or to put it another way, only features that Ubuntu developers can commit to supported for five years will make it in.

Among the changes is a new theme. Well, a new version of the current Yaru theme that use ‘purple’ as the main accent colour. There are also plans to alter the appearance of folder icons, as you can see in the screenshot above.

Furthermore, we reported that Ubuntu has removed the Amazon web launcher from daily builds — a change a lot of users will likely welcome.

The Ubuntu slideshow installer has been updated in the latest daily builds, too.

Other planned changes to Ubuntu 20.04 LTS include:

  • GNOME 3.36
  • Linux Kernel 5.4
  • Improved ZFS install support
  • New wallpapers
  • Smaller .iso image
  • Lightning extension added to Thunderbird
  • Multi-monitor support in GDM
  • Fractional scaling in Xorg session
  • Gaming-related improvements
  • Better GNOME Shell performance

Admittedly this list might not look like a lot right now, but don’t worry: it will grow over the coming 6 months as development kicks in to gear and plans gets underway.

Download Ubuntu 20.04

Ahead of the stable release in April 2020, you can download Ubuntu 20.04 daily builds directly from the Ubuntu CD image server.

Download Ubuntu 20.04(daily build)

The ‘current’ daily live builds (do avoid pending) are created by a build system on a daily basis. Although they have passed a series of qualitative checks, they shouldn’t be considered stable.