@@ -33,37 +33,32 @@ apt-get upgrade -y libstdc++6
3333
3434this_dir=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
3535root_dir=" $( git rev-parse --show-toplevel) "
36- conda_dir=" ${root_dir} /conda"
3736env_dir=" ${root_dir} /env"
3837
3938cd " ${root_dir} "
4039
41- case " $( uname -s) " in
42- Darwin* ) os=MacOSX;;
43- * ) os=Linux
44- esac
45-
46- # 1. Install conda at ./conda
47- if [ ! -d " ${conda_dir} " ]; then
48- printf " * Installing conda\n"
49- wget -O miniconda.sh " http://repo.continuum.io/miniconda/Miniconda3-latest-${os} -x86_64.sh"
50- bash ./miniconda.sh -b -f -p " ${conda_dir} "
40+ # Install uv if not already installed
41+ if ! command -v uv & > /dev/null; then
42+ printf " * Installing uv\n"
43+ curl -LsSf https://astral.sh/uv/install.sh | sh
44+ export PATH=" $HOME /.local/bin:$PATH "
5145fi
52- eval " $( ${conda_dir} /bin/conda shell.bash hook) "
5346
54- # 2. Create test environment at ./env
47+ # Create virtual environment using uv
5548printf " python: ${PYTHON_VERSION} \n"
5649if [ ! -d " ${env_dir} " ]; then
57- printf " * Creating a test environment\n"
58- conda create --prefix " ${env_dir} " -y python= " $ PYTHON_VERSION"
50+ printf " * Creating a test environment with uv \n"
51+ uv venv " ${env_dir} " -- python " ${ PYTHON_VERSION} "
5952fi
60- conda activate " ${env_dir} "
6153
62- # 3. Install Conda dependencies
63- printf " * Installing dependencies (except PyTorch)\n"
64- echo " - python=${PYTHON_VERSION} " >> " ${this_dir} /environment.yml"
65- cat " ${this_dir} /environment.yml"
54+ # Activate the virtual environment
55+ source " ${env_dir} /bin/activate"
6656
67- pip3 install pip --upgrade
57+ # Upgrade pip
58+ uv pip install --upgrade pip
6859
69- conda env update --file " ${this_dir} /environment.yml" --prune
60+ # Install dependencies from requirements.txt
61+ printf " * Installing dependencies (except PyTorch)\n"
62+ if [ -f " ${this_dir} /requirements.txt" ]; then
63+ uv pip install -r " ${this_dir} /requirements.txt"
64+ fi
0 commit comments