Skip to content

Commit

Permalink
fix: Change Vagrant box to jammy64
Browse files Browse the repository at this point in the history
  • Loading branch information
drorganvidez committed Sep 10, 2024
1 parent 81fd06a commit e6455b1
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 15 deletions.
41 changes: 28 additions & 13 deletions vagrant/04_install_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,51 @@
become: true

tasks:
- name: Update the system and install Python and dependencies
apt:
- name: Add deadsnakes PPA (for installing Python 3.12)
apt_repository:
repo: ppa:deadsnakes/ppa
state: present
update_cache: yes

- name: Update the system and install Python 3.12 and dependencies
apt:
name:
- python3
- python3-pip
- python3-venv
- python3.12
- python3.12-venv
- python3.12-distutils
- mariadb-client
state: present

- name: Ensure venv module is installed
apt:
name: python3-venv
state: present
- name: Install pip and setuptools for Python 3.12 from source
shell: |
wget https://bootstrap.pypa.io/get-pip.py
python3.12 get-pip.py
args:
executable: /bin/bash

- name: Upgrade pip and setuptools for Python 3.12
shell: |
python3.12 -m pip install --upgrade pip setuptools
args:
executable: /bin/bash

- name: Remove existing virtual environment if it exists
file:
path: "{{ working_dir }}venv"
state: absent
force: yes

- name: Set up the Python virtual environment
command: python3 -m venv {{ working_dir }}venv
- name: Set up the Python 3.12 virtual environment
command: python3.12 -m venv {{ working_dir }}venv
args:
creates: "{{ working_dir }}venv/bin/activate"

- name: Activate the virtual environment and install dependencies
shell: |
source {{ working_dir }}venv/bin/activate
pip install -r {{ working_dir }}requirements.txt
pip install -e {{ working_dir }}
pip install --upgrade pip
cd {{ working_dir }}
pip install -r requirements.txt
pip install -e ./
args:
executable: /bin/bash
4 changes: 2 additions & 2 deletions vagrant/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ end
Vagrant.configure("2") do |config|

# Choose a base box
config.vm.box = "ubuntu/mantic64"
config.vm.box = "ubuntu/jammy64"

# Network configuration
config.vm.network "forwarded_port", guest: 5000, host: 5000
Expand Down Expand Up @@ -85,4 +85,4 @@ Vagrant.configure("2") do |config|
vb.memory = "2048"
vb.cpus = 4
end
end
end

0 comments on commit e6455b1

Please sign in to comment.