andyqin18 commited on
Commit
5b45a77
1 Parent(s): 7296fc1

Finished Milestone1

Browse files
README.md CHANGED
@@ -1,27 +1,94 @@
1
- ## AI Project: Finetuning Language Models - Toxic Tweets
2
- Hello this is for milestone -1
3
 
4
- # Enable WSL2 feature
5
- wsl --install (Ubuntu is automatically installed and wsl2 by default)
6
 
7
- create linux username and password
8
 
9
- sudo apt update && sudo apt upgrade
10
 
11
- Ubuntu can be seen in Windows Terminal now
12
 
 
13
 
14
- # Download and install the linux kernel update package
15
- Error: wsl_update_x64.msi unable to run because "This update only applies to machines with the Windows Subsystem for Linux"
16
- Solution: Opened Windows features and enabled "Windows Subsystem for Linux"
17
- Successfully run update package
18
 
 
 
 
19
 
20
- # Download Docker Desktop
21
 
 
22
 
23
- `docker ps`
24
- `docker image ls`
25
- `docker run -it ubuntu`
26
 
 
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # AI Project: Finetuning Language Models - Toxic Tweets
 
2
 
3
+ Hello! This is a project for CS-UY 4613: Artificial Intelligence. I'm providing a step-by-step instruction on finetuning language models for detecting toxic tweets.
 
4
 
5
+ # Milestone 1
6
 
7
+ This milestone includes setting up docker and creating a development environment on Windows 11.
8
 
9
+ ## 1. Enable WSL2 feature
10
 
11
+ The Windows Subsystem for Linux (WSL) lets developers install a Linux distribution on Windows.
12
 
13
+ ```
14
+ wsl --install
15
+ ```
 
16
 
17
+ Ubuntu is the default distribution installed and WSL2 is the default version.
18
+ After creating linux username and password, Ubuntu can be seen in Windows Terminal now.
19
+ Details can be found [here](https://learn.microsoft.com/en-us/windows/wsl/install).
20
 
21
+ ![](milestone1/wsl2.png)
22
 
23
+ ## 2. Download and install the Linux kernel update package
24
 
25
+ The package needs to be downloaded before installing Docker Desktop.
26
+ However, this error might occur:
 
27
 
28
+ `Error: wsl_update_x64.msi unable to run because "This update only applies to machines with the Windows Subsystem for Linux"`
29
 
30
+ Solution: Opened Windows features and enabled "Windows Subsystem for Linux".
31
+ Successfully ran update [package](https://docs.microsoft.com/windows/wsl/wsl2-kernel).
32
+
33
+ ![](milestone1/kernal_update_sol.png)
34
+
35
+ ## 3. Download Docker Desktop
36
+
37
+ After downloading the [Docker App](https://www.docker.com/products/docker-desktop/), WSL2 based engine is automatically enabled.
38
+ If not, follow [this link](https://docs.docker.com/desktop/windows/wsl/) for steps to turn on WSL2 backend.
39
+ Open the app and input `docker version` in Terminal to check server running.
40
+
41
+ ![](milestone1/docker_version.png)
42
+ Docker is ready to go.
43
+
44
+ ## 4. Create project container and image
45
+
46
+ First we download the Ubuntu image from Docker’s library with:
47
+ ```
48
+ docker pull ubuntu
49
+ ```
50
+ We can check the available images with:
51
+ ```
52
+ docker image ls
53
+ ```
54
+ We can create a container named *AI_project* based on Ubuntu image with:
55
+ ```
56
+ docker run -it --name=AI_project ubuntu
57
+ ```
58
+ The `–it` options instruct the container to launch in interactive mode and enable a Terminal typing interface.
59
+ After this, a shell is generated and we are directed to Linux Terminal within the container.
60
+ `root` represents the currently logged-in user with highest privileges, and `249cf37645b4` is the container ID.
61
+
62
+ ![](milestone1/docker_create_container.png)
63
+
64
+ ## 5. Hello World!
65
+
66
+ Now we can mess with the container by downloading python and pip needed for the project.
67
+ First we update and upgrade packages by: (`apt` is Advanced Packaging Tool)
68
+ ```
69
+ apt update && apt upgrade
70
+ ```
71
+ Then we download python and pip with:
72
+ ```
73
+ apt install python3 pip
74
+ ```
75
+ We can confirm successful installation by checking the current version of python and pip.
76
+ Then create a script file of *hello_world.py* under `root` directory, and run the script.
77
+ You will see the following in VSCode and Terminal.
78
+
79
+ ![](milestone1/vscode.png)
80
+ ![](milestone1/hello_world.png)
81
+
82
+ ## 6. Commit changes to a new image specifically for the project
83
+
84
+ After setting up the container we can commit changes to a specific project image with a tag of *milestone1* with:
85
+ ```
86
+ docker commit [CONTAINER] [NEW_IMAGE]:[TAG]
87
+ ```
88
+ Now if we check the available images there should be a new image for the project. If we list all containers we should be able to identify the one we were working on through container ID.
89
+
90
+ ![](milestone1/commit_to_new_image.png)
91
+
92
+ The Docker Desktop app should match the image list we see on Terminal.
93
+
94
+ ![](milestone1/app_image_list.png)
milestone1/app_image_list.png ADDED
milestone1/commit_to_new_image.png ADDED
milestone1/docker_create_container.png ADDED
milestone1/docker_version.png ADDED
milestone1/hello_world.png ADDED
milestone1/kernal_update_error.png ADDED
milestone1/kernal_update_sol.png ADDED
milestone1/vscode.png ADDED
milestone1/wsl2.png ADDED