Site Search

How to create an AI development environment

AI development flow

When starting AI development, it is important to first imagine what can be achieved by using AI. If the goal is unclear, it may end up being half-baked without producing the desired effect. First, set a clear goal.

After that, we will put together a plan, collect the data necessary for AI learning, create a learning model, develop an application that realizes what we want AI to do, and then move to operation. However, even after operation, the real system operation using AI will begin, such as by relearning the model and creating additional AI models for functional expansion, in search of better model accuracy.

 

In order to utilize AI in this way, it is necessary to prepare the infrastructure environment for AI development at the appropriate timing of the following flow.

AI development flow

Environment required for AI development

To develop an AI model, you need an "environment" for it. In this chapter, I will talk about the environment that should be prepared first from the viewpoint of hardware and software.

hardware

Since a lot of computational processing is performed in AI model learning, development efficiency depends on whether computation time can be reduced. Therefore, GPUs (Graphic Processor Units) and processors capable of high-speed arithmetic processing are essential. There are two main ways to use the GPU.

 

・GPU instance in the cloud

・A workstation or laptop computer with a GPU card inserted

Hardware required for AI development

However, if you suddenly choose the cloud, you may be worried that the trial and error of deep learning will take time and your bill will increase, so we recommend that you purchase a workstation or laptop first.

 

Also, when purchasing, it is necessary to select the OS accordingly.

OS

helpful

Amount of information on the web

GPU support

Conclusion

Linux

(Ubuntu)

◎ abundant

〇 Yes

the best option. Especially for those who want to learn and practice AI in earnest with WS with GPU.

Windows

〇 Moderate

〇 Yes

It is ideal for those who want to use a PC for daily use and a familiar environment, but anxiety remains when encountering an error.

macOS

△ Not much

× None

It cannot be selected when using the GPU. If it is a CPU version, it is OK.

 

Linux is currently the best choice for AI development using GPUs.

Just by purchasing or borrowing, basically software other than the OS necessary for AI development is not installed, and it is necessary for the developer to build and maintain it himself. The figure below shows the minimum hardware and software environment required for AI development. Let's explore this element.

Environment required for AI development

software

There are many development methods, and I think that there are many people who do not know what kind of programming language and what kind of environment should be prepared. In AI development, the stage of building the environment is difficult, and the current situation is that it is difficult even for beginners to try. First of all, if you choose it, we will carefully select and introduce you to the one that you can't go wrong.

What is a language for AI development

When it comes to programming languages, most people think of C language. The C language is a relatively old language, and is not often used in AI development because of the large amount of source code and the time and effort required to compile programs.

 

In AI development, a language called Python is often used. The reason is that it is a lightweight programming language and requires less source code than C language, so it is easy to learn the language. Furthermore, many of the core frameworks for AI development (details will be explained later) are written in the Python language. Therefore, I think that Python is a good choice for AI development.

What is a framework library

In the world, convenient tools for developing AI are provided as OSS (open source software). Among them, let's understand what frameworks and libraries are.

 

A library is a collection of code that provides a certain function, and is used to easily write Python code in the development of machine learning and deep learning. A collection of multiple libraries with various functions is called a framework. The terms library and framework are often used interchangeably.

 

Here are three frameworks that are easy to use for machine learning and deep learning development.

・TensorFlow

It is a machine learning and deep learning framework developed by Google that specializes in manipulating Tensors (multidimensional arrays), and can efficiently implement a neural network called a "brain-like machine learning model."

・PyTorch

Developed by Facebook, it is popular because of its ease of writing and ease of use, and it is very popular among the mainstream deep learning frameworks because it can describe very flexible neural networks.

・ scikit-learn

Various machine learning algorithms are prepared as classes in Python's representative machine learning framework, so you can easily try machine learning.

 

As long as you have the GPU + OS (Linux) + framework (library) that has been explained so far, you can start AI development. If you want to try to operate it, please refer to the information so far.

 

However, the framework library and the application developed on it are characterized by a very strong dependency, and if a library under development is updated to the latest version, the entire framework containing that library will not work. A situation arises in which what was developed in the past cannot be used.

As a way to avoid this problem in advance, we recommend using the virtual technology of the AI development environment. It's not just a virtual technology, but it can dramatically simplify the construction of an AI development environment, so it's a technology that I want you to know all the more.

What is virtual technology Docker

When developing AI, it has become standard to use “Docker”, one of the virtual technologies that can receive various benefits. I will also explain what Docker is and the benefits of using it.

 

Docker is a tool for building containers, and is a virtualization technology that allows applications, frameworks, and libraries to be grouped into independent environments. Updates to some libraries in one container do not affect environments in other containers. Also, in general, to implement a virtual machine, a hypervisor is installed on the host machine, a guest OS is run, middleware is run on top of that, and so on. Docker can realize those functions in one, so it is possible to start, stop, and destroy each container at light weight and high speed.

AI development environment using Docker

Here are three advantages of using Docker.

 

(1) Easy updating of complex frameworks

 

Frameworks used in AI development such as Tensorflow and PyTorch are evolving day by day, and we want to update to the latest environment. However, it is not easy to update these as it was said that there is a strong dependency. By building Docker in the environment, the latest framework is distributed in the form of a “Docker image” and can be easily updated. Anyone can use it easily, and NVIDIA also provides GPU-optimized Docker images on NGC (nvidia GPU cloud), so there is no reason not to use it.

 

 

② You can check the reproducibility of the operation by operating it in the same environment with many people.

 

By passing the created Docker image to other people and using it, you can prevent environment version discrepancies with other people and shorten the development environment preparation time.

 

 

(3) Small environments can be easily constructed and destroyed

 

It is suitable for trial-and-error AI development because a disposable test environment can be created and destroyed instantly without destroying the host environment.

 

 

If you can build up to this point, it will be an ideal environment in the early stages of AI development. Recently, it seems that there are workstations and instances that are sold with an environment including Docker installed, but in general, you build up to this point yourself.

Development environment to consider in the future

At first, projects that were developed by individuals will grow to the scale of team development as the examination progresses, and more results will be required. As the number of teams increases, many developer members will worry about the environment for development. I often hear stories like this.

 

・I want to use computational resources (GPU) efficiently in my team

・I want to share developed assets

・I want to easily increase resources when computational resources run out

 

Using Docker will increase portability to some extent, but you will still need to think about how to use resources well. In that case, the secret is to consult an engineer with specialized knowledge.

 

Inquiry

For companies that are considering digitizing their products and services and converting them to AI/IoT in order to develop new markets and promote the development of new products, we provide easy-to-understand explanations on everything from optimal product selection to introduction methods. Let me do it. Please feel free to contact us.

Return to special (menu) page