Skip to content

Commit c17ea28

Browse files
committed
Update README and CI
1 parent 95c958f commit c17ea28

4 files changed

Lines changed: 91 additions & 160 deletions

File tree

.github/workflows/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
noble-basic:
11+
name: Ubuntu Noble (24.04) - Basic Setup + GenSoftware
12+
runs-on: ubuntu-24.04
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: '3.12'
21+
22+
- name: Configure timezone
23+
run: |
24+
echo 'America/Los_Angeles' | sudo tee /etc/timezone
25+
sudo dpkg-reconfigure --frontend noninteractive tzdata
26+
27+
- name: Install dependencies
28+
run: |
29+
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse" -y
30+
sudo apt-get update -qq
31+
sudo apt-get install -y software-properties-common
32+
sudo apt-get install -qq build-essential curl g++ python3-dev python3-setuptools gdb
33+
34+
- name: Run BasicSetup and GenSoftware
35+
run: |
36+
./1-BasicSetUp.sh
37+
export PATH=/opt/anaconda3/bin:$PATH
38+
hash -r
39+
./2-GenSoftware.sh
40+
41+
oracular-basic:
42+
name: Ubuntu Oracular (26.04) - Basic Setup + GenSoftware
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Checkout repository
46+
uses: actions/checkout@v4
47+
48+
- name: Set up Python
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: '3.12'
52+
53+
- name: Configure timezone
54+
run: |
55+
echo 'America/Los_Angeles' | sudo tee /etc/timezone
56+
sudo dpkg-reconfigure --frontend noninteractive tzdata
57+
58+
- name: Install dependencies
59+
run: |
60+
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse" -y
61+
sudo apt-get update -qq
62+
sudo apt-get install -y software-properties-common
63+
sudo apt-get install -qq build-essential curl g++ python3-dev python3-setuptools gdb
64+
65+
- name: Run BasicSetup and GenSoftware
66+
run: |
67+
./1-BasicSetUp.sh
68+
export PATH=/opt/anaconda3/bin:$PATH
69+
hash -r
70+
./2-GenSoftware.sh

.travis.yml

Lines changed: 0 additions & 96 deletions
This file was deleted.

README.md

Lines changed: 20 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -5,48 +5,35 @@ These are the scripts that I use to set my Ubuntu up as quick as possible. Feel
55

66
## Build Status:
77

8-
Every script is rock stable and runs against [Travis CI](https://travis-ci.org) to make sure everything works as expected. Note that `Build-ML.sh` is not shown here as it takes >2 hours to build TF+Pytorch on the Travis systems from source, and 2 hours is the system limit for free accounts on Travis. You can, however, still see the results of it running [here](https://travis-ci.org/rsnk96/Ubuntu-Setup-Scripts)
8+
Every script is stable and validates with [CI](https://github.com/features/actions) to make sure everything works as expected. The scripts are tested on Ubuntu 24.04 (Noble) and 26.04 (Oracular) LTS releases.
99

10-
11-
| 1-BasicSetUp and 2-GenSoftware | 3-ML-Basic | Build-OpenCV | Build-OpenCV in a conda env |
12-
|-------------------|-------------------|-------------------|--------------------|
13-
| [![Build1][5]][11] | [![Build2][7]][11] | [![Build3][6]][11] | [![Build4][8]][11] |
14-
15-
[5]: https://travis-matrix-badges.herokuapp.com/repos/rsnk96/Ubuntu-Setup-Scripts/branches/master/5
16-
[6]: https://travis-matrix-badges.herokuapp.com/repos/rsnk96/Ubuntu-Setup-Scripts/branches/master/6
17-
[7]: https://travis-matrix-badges.herokuapp.com/repos/rsnk96/Ubuntu-Setup-Scripts/branches/master/7
18-
[8]: https://travis-matrix-badges.herokuapp.com/repos/rsnk96/Ubuntu-Setup-Scripts/branches/master/8
19-
[11]: https://travis-ci.org/rsnk96/Ubuntu-Setup-Scripts
10+
You can see the build results in the [Actions tab](https://github.com/rsnk96/Ubuntu-Setup-Scripts/actions) of this repository.
2011

2112
## Usage instructions
2213
First download/clone this repository
2314

24-
Then execute them in the terminal in the sequence of filenames using `./1-BasicSetUp.sh`, `/2-GenSoftware.sh`, and so on.
25-
* `1-BasicSetUp.sh` - Sets up terminal configuration, a download accelerator, anaconda python, and shell aliases.
26-
* Now is a good time to restart your PC if you have an Nvidia GPU so that the display driver loads
27-
* `2-GenSoftware.sh` - Sets up tools for programming(editor, etc), and other general purpose software I use
28-
* `3-ML-Basic.sh` - Installs from pip/conda commonly used DL libraries, and also installs the latest cuda if no cuda is detected
29-
30-
Additional scripts to built libraries from source:
31-
* `Build-ML.sh` - Compiles commonly used ML/DL libraries from source, so that it is optimized to run on your computer
32-
* `Build-OpenCV.sh` - Compiles the latest tag of OpenCV+Contrib from source on your machine with focus on optimization of execution of OpenCV code.
15+
Then execute them in the terminal in the sequence of filenames using `./1-BasicSetUp.sh` and `./2-GenSoftware.sh`.
16+
* `1-BasicSetUp.sh` - Sets up terminal configuration (Zsh + Zim), download accelerator (aria2), Anaconda Python, shell aliases, Docker, Nvidia drivers (if detected), Neovim with LazyVim, and other essential tools. **Note:** After running this script, you should reboot your PC if you have an Nvidia GPU so that the display driver loads properly.
17+
* `2-GenSoftware.sh` - Installs general purpose software including VS Code, Cursor IDE, browsers (Brave, Chrome), system monitoring tools, screenshot tools, media players, and other utilities.
3318

3419

3520
## Major Alterations
36-
* Default python will be changed to Anaconda, with the latest Python 3. Anaconda Python will be installed in `/opt/anaconda3/` so that it is accessible by multiple users
37-
* Default shell is changed to Zim, a zsh plugin, instead of bash. Why zsh? Because it simply has a much better autocomplete. And why zim? Because it's much faster than Oh My Zsh and Prezto
21+
* Default python will be changed to Anaconda (Miniconda), with the latest Python 3. Anaconda Python will be installed in `/opt/anaconda3/` so that it is accessible by multiple users
22+
* Default shell is changed to Zsh with Zim framework, instead of bash. Why zsh? Because it simply has a much better autocomplete. And why zim? Because it's much faster than Oh My Zsh and Prezto
23+
* Docker and Docker Compose will be installed, along with Nvidia Container Toolkit if an Nvidia GPU is detected
24+
* Neovim will be installed with LazyVim configuration for a modern editor experience
25+
* Zellij terminal multiplexer will be installed as an alternative to tmux
26+
* Display manager will be configured to use X11 (Xorg) instead of Wayland for better compatibility
3827

3928
## Aliases that are added
4029
* `maxvol` : Will set your volume to 150%
4130
* `download <webpage-name>`: Download the webpage and all sub-directories linked to it
42-
* `server` : Sets up a server for file sharing in your local network. Whatever is in your current directory will be visible on the ip. It will also print the possible set of IP addresses. To access from another computer, shoot up a browser and simply hit `ip_add:port`
31+
* `file_server` : Sets up a server for file sharing in your local network. Whatever is in your current directory will be visible on the ip. It will also print the possible set of IP addresses. To access from another computer, shoot up a browser and simply hit `ip_add:port`
4332
* `gpom` : Alias for `git push origin master`. Will push your current directory
33+
* `glog` : Shows a rich, annotated git log graph with commits from your current branch, main, and their remote counterparts. Commits show date, relative time, decorations (branches/tags), subject, and author, making it easy to visualize your branch's history in relation to main and remotes.
4434
* `jn` : Starts a jupyter notebook in that directory
4535
* `jl` : Starts a jupyter lab in that directory
46-
* `ydl "URL"`: Downloads the song at `URL` at 128kbps, 44.1kHz in m4a format with the title and song name automatically set in the metadata
4736
* `update`: Runs `sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove -y`
48-
* `tsux`: Create a tmux session with `-u` (so that the icons(battery, etc) are properly displayed at the bottom), and with a window with `htop`, `nvidia-smi -l 1` and `lm-sensors` automatically activated.
49-
- Reason for not making this the default tmux: You cannot attach tmux sessions if you alias the `tmux` command itself
5037
* `aria`: For accelerated download of files using aria2c. Runs the following command: `aria2c --file-allocation=none -c -x 10 -s 10 -d aria2-downloads`
5138

5239
<br>
@@ -70,46 +57,15 @@ Additional scripts to built libraries from source:
7057
sudo chown -R $NEW_USER: /home/$NEW_USER/.zim /home/$NEW_USER/.bash_aliases /home/$NEW_USER/.zimrc /home/$NEW_USER/.zlogin /home/$NEW_USER/.zshrc /home/$NEW_USER/.xbindkeysrc /home/$NEW_USER/.config/tilda /home/$NEW_USER/.tmux.conf*
7158
```
7259
* Make sure that your system time and date is correct and synchronized before running the scripts, otherwise this will cause failure while trying to download the packages.
73-
* `Build-OpenCV.sh`
74-
* OpenCV is built to link to an `ffmpeg` that is built from scratch using [Markus' script](https://github.com/markus-perl/ffmpeg-build-script). The `ffmpeg` that is built is stored in `/opt/ffmpeg-build-script`. While the binaries are copied to `/usr/local/bin`, the specific versions of `libavcodec` and other referenced libraries are still maintained at `/opt/ffmpeg-build-script/workspace/lib`
75-
* If you have Anaconda Python, OpenCV will be linked to Anaconda Python by default, not the Linux default python. If you would like to compile for the Linux default Python, remove Anaconda from your path before running the `Build-OpenCV.sh` script
76-
* If CUDA is already installed when building OpenCV from source, it'll be detected and the corresponding flags (`-D WITH_CUDA`, `-D WITH_CUBLAS`, `-D WITH_CUFFT`,`-D CUDA_FAST_MATH`) are enabled.
77-
* Similarly, if CuDNN is also installed, then support for that will be enabled. By default, if CuDNN is installed, then OpenCV's DNN module with support for Nvidia GPUS (only in OpenCV >= 4.2.0) will also be built. Note that this requires GPUs with Compute Capability (i.e. architecture) 5.3 or higher. Default behaviour is build for all supported architectures, but you can speed up the compilation by specifying the architecture in the `CUDA_ARCH_BIN` flag as described below.
78-
* Building OpenCV with CUDA enabled can take a very long time, since it has to build the same code for all GPU architectures. If you don't need to compile for all architectures, you can specify the architecture using `CUDA_ARCH_BIN` such as 30 for Kepler, 61 for Pascal, etc. Information about your GPU can be found at [Nvidia's page](https://developer.nvidia.com/cuda-gpus)
79-
* Non-free & patented algorithms in OpenCV such as SIFT & SURF have been enabled, for disabling them, set the flag `-D OPENCV_ENABLE_NONFREE=ON` to off
80-
* OpenCV will be built without support for Python 2. If you would like to build it with Python 2 support, then add back the lines removed in [this commit](https://github.com/rsnk96/Ubuntu-Setup-Scripts/commit/1e50b5fabff0026300879eb73ed36bb9b34ed6c9)
81-
* After OpenCV installation, if you get an error of the sort `illegal hardware instructions` when you try to run a python or c++ program, that is because your CPU is an older one (Pentium/Celeron/...). You can overcome this by adding the following to the end of the cmake (just before the `..`)
82-
83-
```bash
84-
-D ENABLE_SSE=OFF \
85-
-D ENABLE_SSE2=OFF \
86-
-D ENABLE_SSE3=OFF ..
87-
```
88-
89-
If you still want to be able to receive the benefits of CPU optimization to whatever extent you can, then hit `cat /proc/cpuinfo` and see what `sse`s are available under flags
90-
* If you run into compilation problems or something else during OpenCV installation, make sure to remove the entire `build` folder inside `opencv` directory before rebuilding, otherwise strange errors can pop up.
91-
* `Build-ML.sh`
92-
* Building Tensorflow from source has different configuration options, info on which can be seen on [Tensorflow's Build from Source page](https://www.tensorflow.org/install/source). Note that by default, 2.x version of Tensorflow will be built, to build 1.x version, add `--config=v1` to the bazel build command
93-
* If you want to install a specific version of OpenCV or Tensorflow, i.e different from the latest release, make the following changes. The scripts should work with different versions but they haven't been tested
94-
* OpenCV
95-
Comment out the [line fetching the latest release tag](https://github.com/rsnk96/Ubuntu-Setup-Scripts/blob/master/Build-OpenCV.sh#L170) in the `Build-OpenCV` script.
96-
Add the line below the above commented out one specifying the OpenCV version which you want like this: `latest_tag="3.4.5"`
97-
Alternatively, you could just replace `$latest_tag` with the tag of the version in the following 2 lines: `git checkout -f $latest_tag`
98-
Make sure that the tag of the OpenCV version you want is correct. The tags of all the releases can be checked here - [https://github.com/opencv/opencv/tags](https://github.com/opencv/opencv/tags)
99-
100-
* Tensorflow
101-
Similar to above, locate the [line fetching the latest release tag](https://github.com/rsnk96/Ubuntu-Setup-Scripts/blob/master/Build-ML.sh#L120) of Tensorflow and replace with the tag of the version required.
102-
The tags of all the Tensorflow releases can be checked here - [https://github.com/tensorflow/tensorflow/tags](https://github.com/tensorflow/tensorflow/tags)
103-
* These scripts are written and tested on the following configurations -
104-
* Ubuntu 18.04 & 20.04 (for support for 16.04, please use the tree as per previous commits on this repo)
105-
* 32-bit and 64-bit Intel Processors
106-
* `ML-Build.sh` - NVIDIA GPUs including but not limited to GeForce GTX 1080, 1070, 940MX, 850M, and Titan X
107-
108-
Although it should work on other configurations out of the box, I have not tested them
60+
* These scripts are written and tested on the following configurations:
61+
* Ubuntu 24.04 (Noble) and 26.04 (Oracular) LTS releases
62+
* 64-bit Intel/AMD Processors
63+
* NVIDIA GPUs (drivers will be automatically installed if detected)
64+
65+
Although it should work on other configurations out of the box, they have not been tested
10966

11067
* Docker Images
111-
* An example `Dockerfile` is present in the repository, which builds OpenCV with CUDA support enabled. Customize it as required for specific requirements such as different CUDA versions, CPU-only images, etc.
112-
* Some images built using these scripts can be found at [Docker Hub](https://hub.docker.com/r/rajat2004/ubuntu-setup-scripts)
68+
* An example `Dockerfile` is present in the repository for reference. Customize it as required for specific requirements.
11369

11470
## Tmux configuration shortctus:
11571

config_files/bash_aliases

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ alias glog="git log --graph --abbrev-commit --decorate --format=format:'%C(bold
88
alias update="sudo apt update && sudo apt upgrade -y && sudo apt autoremove -y"
99
alias aria="aria2c --file-allocation=none -c -x 10 -s 10"
1010
alias cat="batcat -p"
11+
alias vi = "nvim"

0 commit comments

Comments
 (0)