-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdevsetup.sh
121 lines (92 loc) · 3.67 KB
/
devsetup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# based on this guide
# https://engineeringfordatascience.com/posts/setting_up_a_macbook_for_data_science/
# another good resource
# https://eugeneyan.com/writing/mac-setup/
# homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# add Homebrew to your path if prompted
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/<your-username>/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
# install iterm2 using Homebrew
brew install --cask iterm2
# install oh my zsh for terminal customization
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# install and configure git
brew install git
git config --global user.name "John Doe"
git config --global user.email [email protected]
# install uv
# replaces pip, pipenv, pyenv, etc
curl -LsSf https://astral.sh/uv/install.sh | sh
# install pyenv and dependancies, configure
# brew install openssl readline sqlite3 xz zlib
# brew install pyenv
# echo 'eval "$(pyenv init --path)"' >> ~/.zprofile
# echo 'eval "$(pyenv init -)"' >> ~/.zshrc
## setup for pyenv
# list available python versions
# pyenv versions
# install separate python version 3.10.0
# pyenv install 3.10.0
# list versions again
# pyenv versions
# set default version to newly installed 3.10.0
# pyenv global 3.10.0
# install pyenv-virtualenv plugin
# brew install pyenv-virtualenv
# run this command to add a new line to your to .zshrc
# echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.zshrc
# create new virtualenv (e.g. pyenv virtualenv <python-version> <env-name>)
# pyenv virtualenv 3.10.0 test_project
# activate the virtualenv
# pyenv activate test_project
# list all available virtual environments
# pyenv virtualenvs
# A really nice feature of pyenv-virtualenv
# is that you can set the Python version and virtual environment for each directory
# so that the correct virtual environment is automatically activated when you navigate to that directory.
# create and navigate to an example directory called 'test_project'
# mkdir test_project && cd test_project
# set the 'local' environment to use the 'test_project' virtualenv created above
# pyenv local test_project
# adding packages in a virtual env
# activate virtual environment if not already activated
# pyenv activate test_project
# install jupyterlab into your virtual environment
# pip install jupyterlab
# open jupyter lab
# jupyter lab
# install vs code
brew install --cask visual-studio-code
# Extensions
# VSCode has many great features and extensions. My favourite extensions that I install are:
# Python – Python code completion (IntelliSense) and linting support
# Pylance – type checking tool (see my article on the importance of type hinting )
# Jupyter – allows you to create and interact with Jupyter notebooks within VSCode
# GitLense – valuable functionality to improve your Git workflow and keep track of changes
# Other useful extensions are:
# Docker – useful for interacting with Docker containers (see below)
# Vim – Vim keybindings in VSCode!
# settings.json
# {
# "editor.formatOnSaveMode":"file",
# "editor.formatOnSave":true,
# "editor.codeActionsOnSave": { "source.organizeImports": true},
# "python.linting.pylintEnabled":true,
# "python.linting.enabled": true,
# "python.analysis.typeCheckingMode": "strict",
# "python.formatting.provider": "black",
# }
# serving local llms
brew install ollama
ollama serve
# in another terminal, pull some models to try
ollama pull llama3.2 nemotron # 3B and 70B respectively
# llm ui
pip install open-webui
open-webui serve
# other useful things
brew install tree
brew install htop
brew install --cask rectangle
brew install --cask raycast