current position:Home>[Bi She] Style Migration Based on CycleGAN [3] Code Migration to Server (Linux) and Environment Construction
[Bi She] Style Migration Based on CycleGAN [3] Code Migration to Server (Linux) and Environment Construction
2023-01-25 10:55:10【Mr Roose】
1. Assume that anaconda has been installed on the server.
2. Copy the code file (file name pytorch-CycleGAN-and-pix2pix-master) to the Desktop (desktop) via the U disk
3. Open Terminal, you will directly enter the anaconda terminal.
Anaconda operation under Linux (similar to windows)
See which environments currently exist
conda env list
Create a new virtual environment.
conda create -n your_env_name python=X.X (2.7, 3.6, etc.)
Activate the virtual environment.Before you can use the environment, it needs to be activated.
source activate your_env_name
Install various required python packages.
pip install package_name
(If you create a python3.x environment, use pip directly instead of pip3. Because pip3 may be installed directly into your system environment at this time.)
Close the virtual environment.When you are done using it, you need to close the virtual environment.
source deactivate
Delete the virtual environment.
conda remove -n your_env_name --all
Shared environment: Package the name of the python package contained in the currently used environment.
conda env export > filename.yaml
Load an environment shared by others.
conda env update -f=/path/filename.yml
4. Create a new environment called cyclegan: conda create -n cyclegan python=3.6
5. Activate (enter) the cyclegan environment: source activate cyclegan
6. Because we want to copy the environment directly with the txt file provided by the author, we need the cd path to the code file you just copied to the Desktop (desktop): cd /home/dell/Desktop/pytorch-CycleGAN-and-pix2pix-master/
(Novices may have a question, why is there a dell file in the middle when Desktop is the home file?
Explanation:
Questions
There is an aaa folder under the home folder. Why can't I choose the aaa folder?
Solution
As it says, because there is no such directory.Terms such as "home directory", "home directory", "home folder" and "user directory" refer to the directory represented by ~
, which is the main directory assigned to this user.For normal users, usually it is located at "/home/username".What you said should be ~/aaa
, which means /home/test/aaa
when expanded.Remember to use ls to view directory contents.)
7. Under normal circumstances, we can directly use pip install -r requirements.txt (requirements.txt is the environment package packaged by the author) to reproduce the environment, but the speed is too slow.So we use the mirror source to fork the environment.
Domestic source:
Tsinghua: https://pypi.tuna.tsinghua.edu.cn/simple
Aliyun: http://mirrors.aliyun.com/pypi/simple/
University of Science and Technology of China https://pypi.mirrors.ustc.edu.cn/simple/
Huazhong University of Science and Technology: http://pypi.hustunique.com/
Shandong University of Technology: http://pypi.sdutlinux.org/
Douban: http://pypi.douban.com/simple/
Example of use:
You can add parameter -i when using pip https://pypi.tuna.tsinghua.edu.cn/simple
For example: pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyspider, so that the pyspider library will be installed from the Tsinghua mirror.
Continued 7. We can reproduce the environment by typing pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt.
There is another way to fork the environment:
We can directly copy the environment in pycharm, first create a virtual environment in Terminal, and then according to (5 messages) How to configure the existing environment in Pycharm_MrRoose1's blog-CSDN blog_pycharmHow to configure the environment After configuring the environment and selecting that environment, then directly perform pip install -r requirements.txt in the Terminal in pycharm (depending on whether the name in the front brackets in the Terminal is the environment you want to enterfirst name)
copyright notice
author[Mr Roose],Please bring the original link to reprint, thank you.
https://en.cdmana.com/2023/025/202301251029560074.html
The sidebar is recommended
- Based on VirtualBox centos7 virtual machine installation
- JVM process cache - Caffeine
- Code Caprice No24 | Backtracking Algorithm Theoretical Basis, 77. Combination
- The Road to Algorithm Practice——[String] Leetcode 824 Goat Latin
- Git summary - Prompt to submit or temporarily store changes when switching to a branch
- Productivity tools - [gitlab configuration] One-time configuration of GitLab account
- Echo+Vue+ElementUI management background source code
- Revel+Vue+ElementUI framework use and build tutorial
- Basic practice tutorial of Revel+Vue+ElementUI framework
- Go Web Development Revel+Vue+ElementUI Framework Practical Tutorial
guess what you like
Construction and deployment tutorial of Revel+Vue+ElementUI framework
8. Java loop advanced comprehensive exercises - infinite loop and jump control statement, every seven passes, square root, judging whether it is a prime number, guessing number games
Control statement + exception handling perfect lucky draw applet-java basics
9. Java Array Knowledge Encyclopedia
Lucky draw applet-java basics
Java basic implementation calculator applet
The front end of actual combat: copy write millet's official website on the first day
1. Linux application programming and network programming---file IO notes in Linux system
7. Linux application programming and network programming --- thread full solution Notes
[Front-end notes - CSS] 10. Cascading and inheritance + selector
Random recommended
- 8. Linux application programming and network programming---Linux network programming notes
- [Java|golang] 1828. Count the number of points in a circle
- Add environment variables under Linux system and will not overwrite the previous method of adding environment variables
- 2 · Linux application programming and network programming - file attributes notes
- Redis interview questions (classic 7 questions)
- [Front-end notes——CSS] 11. Box model + background and border
- C + + large Numbers together, according to a combined
- 3. Linux application programming and network programming --- get system information notes
- The use and principle of Kafka message queue
- 5. Linux application programming and network programming---signal notes in Linux
- 6 · Linux application programming and system programming - senior IO notes
- Java collection common interview questions (4)
- 072-JAVA project training: Imitation QQ instant messaging software series lecture 7 (explaining the realization of the chat interface and functions)
- Coordination center performance comparison: how zookeeper solves the load balancing problem
- 070-JAVA project training: imitation QQ instant messaging software series lecture five (explain user registration function)
- Ubuntu installation and configuration (brief)
- 073-JAVA project training: imitation QQ instant messaging software series lecture eight (explain query and add friend function)
- SQL injection classification and error injection EXP
- All basic commands in linux fail, showing that the command cannot be found
- 4. Linux application programming and network programming---Linux process full solution notes (difference between process and program)
- Linux system - basic IO
- Hanlp's understanding of user-defined dictionaries (java version)
- Brief description and configuration of Maven
- 071-JAVA project training: imitation QQ instant messaging software series lecture six (explaining the function of QQ main interface)
- 【Maximum LeetCode】January Algorithm Training (12) Linked List
- 【Max LeetCode】January Algorithm Training (13) Doubly Linked List
- [Big Data Management] Java implements Bloom filter
- [Maximum LeetCode] Algorithm training in January (14) stack
- [Machine Learning] Adaboost Integrated Algorithm
- [Big Data Management] Java implements cuckoo filter (CF)
- Chaozhou Xiangqiao: "Charming Ancient City, Cultural Sharing" Spring Festival Intangible Cultural Heritage Market Opens
- [Big data management] Java realizes the dictionary tree TireTree
- [Max LeetCode] January Algorithm Training (11) Matrix
- New Express (Web framework based on HTTP module encapsulation NodeJS)
- JavaScript error-prone questions (stack processing, call function, prototype chain questions)
- Space "travel", lion and crane dance, intangible cultural heritage experience...During the Spring Festival, Zhuhai Jinwan is so fun!
- Wine 8.0 official release: better support for running Windows applications on Linux and other systems
- Zhongke Sugon: Sugon's new computer "participates in" "The Wandering Earth 2"
- Linux actual combat notes finishing (1.24)
- Automatically execute the specified sql when the springBoot project starts