White one-click deployment github all kinds of AI open source projects

Trae

github on all kinds of fun AI project, may be curious to run to try, but for me this kind of white people is very unfriendly, even if you look at the installation instructions to operate in the end can not run successfully, especially windows users, the need for a variety of front installation of all kinds of environments, manually install dependencies, configure the parameters of the file, for the operation of people who do not know the code is very strenuous.

You can try to download Pinokio Deploying all kinds of AI projects, but I've had a lot of problems with Pinokio and it hasn't gone well. So with the next content...

小白一键部署github上各类AI开源项目

 

Difficulties in deploying AI projects for white people

  1. Base dependency environment installation is messed up and can't be fixed
  2. Not sure how to execute a file with a .py extension
  3. The project itself does not have a webUI interface and will not operate from the command line
  4. Hardware constraints prevented the launch of the project
  5. Requires manual installation of the frontend files (or a separate download of the model to be placed in the project directory after deployment)
  6. After downloading the project code, you need to configure the parameter file before you can run the program.
  7. Installation of docker fails for windows users
  8. Network environment cannot download overseas resources

 

Reflections on how to address the above issues

  1. Learn to deploy dependent environments in anaconda; or write a more generalized one-click deployment script for environments, I'll go with the latter.
  2. Write a one-click deployment script that also solves the problem of running files with a .py extension, as per "1".
  3. Popular projects usually have webUI branches, try searching for "project name + webui".
  4. insoluble (i.e. unable to solve)
  5. Can only look at the official help document, you can enter the document to chatgpt, let him guide you to operate, really do not understand no solution!
  6. Can only look at the official help document, you can enter the document to chatgpt, let him guide you to operate, really do not understand no solution!
  7. Learn to install docker, windows tutorials can be found, the core is to install Ubuntu in the wsl command, search for related tutorials on their own
  8. No solution, think of something, or find a domestic mirror...

 

About One-Click Deployment Scripts

In fact, writing a one-click deployment script to solve the environment + run command problem can cover the vast majority of white people, so our goal is to let the white people as long as you enter a line of simple commands, you can complete a variety of projects python project deployment, and run the AI project, the expected goal is to solve the one-click 60% AI project can be installed smoothly with one click.

Here we start to operate, you first do not have to understand why to do so, follow the step-by-step operation down to say, I use windows system demonstration.

 

1. First make sure that your computer has winget installed.

Type cmd in "Run" and press enter to open the command line interface, type winget -v to check if winget is installed, and the version number means it has been installed.

Search for "how to install winget" without installing it.

小白一键部署github上各类AI开源项目

 

2. Download the script file I provided, unzip it and put it in any English directory.

全新电脑没安装过任何基础环境的电脑请下载此脚本,下载解压后双击执行安装:1723510979-ai

脚本下载地址(下载解压后不要点击执行,只要放在一个目录中):1723500870-autogit

小白一键部署github上各类AI开源项目

3. Add the full English directory to the system environment variable

My directory is D:autogit, to add it to the system environment variables, first find the location of the system environment variables and click on "Environment Variables":

Method 1: Win+r, then type sysdm.cpl and press Enter.

Method 2: Type: system environment variables in the search box at the bottom and the

小白一键部署github上各类AI开源项目

 

4. Scroll down to find Path and double-click on it

小白一键部署github上各类AI开源项目

 

5. Click New, and paste the previously created directory, click to confirm it

小白一键部署github上各类AI开源项目

 

6. Check if the system environment variables are set successfully

Open the command line interface, type shell in the search box, find and open "windows powershell" (don't type cmd as it may not start the system environment variables)

小白一键部署github上各类AI开源项目

 

If the following figure appears, complementing the command, the environment variable is active

小白一键部署github上各类AI开源项目

 

Now that the move to the environment is complete, let's move on to deploying the AI project.

 

 

Deployment of AI projects

 

1. Find the git address of the project and click copy.

小白一键部署github上各类AI开源项目

 

2. Select the installation directory of the project, right-click in the directory and click "Open in Terminal".

小白一键部署github上各类AI开源项目

 

3. Deployment of new projects

Type ` auto_init_py_git.bat`, tap space, paste the git address you copied earlier, and press enter.

auto_init_py_git.bat: this command downloads the project file and executes the deployment, if you have already downloaded the project file, use the `auto_init_py.bat` command

小白一键部署github上各类AI开源项目

 

4. Execute project installation

You will encounter two situations, one is the command line is stuck, a moment on the exit, basically network problems, the default domestic network can not be installed directly, think of ways to do it yourself, for example, the following error interface (there is a messy code, meaning that the exit is installed):

小白一键部署github上各类AI开源项目

 

During normal installation, you will see the following screen:

小白一键部署github上各类AI开源项目

 

Then jump to the torch installation interface (the installation package is large, you need to wait a little longer):小白一键部署github上各类AI开源项目

 

Note: The installed torch version should be suitable for most projects, some projects need the latest version, you can edit the auto_init_py_git.bat file with notepad, delete the version number in the file and re-execute the installation:

小白一键部署github上各类AI开源项目

 

5. found missing python dependency how to deal with

Edit the auto_init_py_git.bat file with Notepad and at the bottom you will find the following:

小白一键部署github上各类AI开源项目

 

It means to find that dependency filename from the downloaded git project and install the python dependency according to the contents of the file, let's see if there is such a file in the downloaded git project:

小白一键部署github上各类AI开源项目

 

Good thing... Usually the project author provides this file, if not, or if the dependency file is renamed, you need to install the dependency yourself or edit this filename in auto_init_py_git.bat.

 

6. Enter the following command

pip install -e.

 

7. Run the startup command

The startup command I found from the help documentation, enter it in the project directory command line and press enter to start it.

小白一键部署github上各类AI开源项目

 

小白一键部署github上各类AI开源项目

 

What should I do if I get an error after entering the startup command?

 

Directly copy the entered command and the returned error message to chatgpt to troubleshoot, follow his instructions, usually caused by the lack of basic dependencies. For example

小白一键部署github上各类AI开源项目

 

There is also a special kind of error reporting:

Recall the "Difficulty 5" mentioned in the beginning, that is, the deployed project requires you to download the large model separately, and then put it in the project directory, some projects will automatically download the model for the first time, while some projects require you to download it according to the official help file.

Some projects automatically download domestic models when they start and will ask you toClosure of the scientific environmentPlease note.

© Copyright notes
AiPPT

Related posts

No comments

none
No comments...