Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
class:phy3026 [2018/08/13 21:00] – minerva1993 | class:phy3026 [2023/03/06 13:44] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | =====PHY3026 Computational Physics: Fall 2018===== | + | =====PHY3026 Computational Physics: Fall 2019===== |
+ | |||
+ | ===Class materials in git=== | ||
+ | < | ||
+ | git clone https:// | ||
+ | </ | ||
===Prepare your computing environment=== | ===Prepare your computing environment=== | ||
+ | Choose one of following methods to connect to use ssh and the other linux commands | ||
+ | **Use Mac OS or Linux** | ||
+ | You can directly access to the server with native bash (terminal) in Mac os or Linux. | ||
+ | You can also install Linux (usually Ubuntu) to virtual box ({{https:// | ||
+ | |||
+ | **Install ubuntu via Microsoft appstore** | ||
+ | This part is written based on Windows 10 1903 update. | ||
+ | Open Control Panel (제어판) - Programs and Features (프로그램 및 기능) - Turn Windows features on or off (Windows 기능 끄키/ | ||
+ | |||
+ | Open Microsoft appstore, search for ' | ||
+ | |||
+ | Type username and root password. If you failed to correctly verify password (비밀번호를 두 번 입력해야하는데 실수로 서로 다르게 입력하여 계정 생성에 실패할경우), | ||
+ | |||
+ | In terminal, you can use linux commands like ssh, ls, cd. | ||
+ | |||
+ | *Optional: change ubuntu mirror and update | ||
+ | In terminal, | ||
+ | < | ||
+ | sudo vi / | ||
+ | : | ||
+ | (' | ||
+ | :wq (저장하고 나오기) | ||
+ | sudo apt-get update | ||
+ | sudo apt-get upgrade | ||
+ | sudo apt install python2.7 | ||
+ | sudo pip install numpy | ||
+ | </ | ||
+ | |||
+ | Next, you need to install Xming {{https:// | ||
+ | < | ||
+ | vi ~/.bashrc | ||
+ | GG (vi 명령어, 맨 아래로 이동하기) | ||
+ | i (vi 쓰기모드) | ||
+ | export DISPLAY=0:0 | ||
+ | esc key | ||
+ | :wq | ||
+ | source ~/ | ||
+ | </ | ||
+ | |||
+ | |||
**Install MobaXterm** | **Install MobaXterm** | ||
< | < | ||
https:// | https:// | ||
</ | </ | ||
+ | {{ : | ||
**Connect to server** | **Connect to server** | ||
+ | |||
Ask to tutor to create accounts for students. Start local terminal in mobaxterm. | Ask to tutor to create accounts for students. Start local terminal in mobaxterm. | ||
< | < | ||
- | ssh -p PORT -X YOURID@210.117.210.IP | + | ssh -X YOURID@210.117.210.IP |
</ | </ | ||
**Jupyter notebook** | **Jupyter notebook** | ||
+ | |||
To write and excute python code in your local browser, you need to create ssh tunnel to server. First, make sure you are using unique port number for tunnel. Follow the lines in the server. | To write and excute python code in your local browser, you need to create ssh tunnel to server. First, make sure you are using unique port number for tunnel. Follow the lines in the server. | ||
< | < | ||
+ | ##DO THIS ONLY AT THE FIRST TIME## | ||
jupyter notebook --generate-config | jupyter notebook --generate-config | ||
vi / | vi / | ||
+ | ##DO THIS ONLY AT THE FIRST TIME## | ||
</ | </ | ||
- | You can check your port number in '' | + | Then you can excute jupyter |
< | < | ||
- | ssh -p PORT -f -N -L localhost: | + | jupyter-notebook |
</ | </ | ||
- | Please don't confuse '' | ||
- | Then you can excute jupyter | + | You can check your port number in '' |
< | < | ||
- | jupyter-notebook | + | ssh -f -N -L localhost: |
</ | </ | ||
- | The adress | + | |
+ | The address | ||
*Run '' | *Run '' | ||
Line 38: | Line 88: | ||
*Disable ssh tunnel* | *Disable ssh tunnel* | ||
+ | |||
This is optional. But it can be required if you are using your own laptop without logout/ | This is optional. But it can be required if you are using your own laptop without logout/ | ||
< | < |