Skip to content

Latest commit

 

History

History
111 lines (74 loc) · 1.76 KB

File metadata and controls

111 lines (74 loc) · 1.76 KB

Using Python venv 🐍

  • Go to location using cmd or terminal

    python -m venv myvenv
    # On Windows
    .\myvenv\Scripts\activate --OR-- source myvenv/bin/activate # On Linux or Mac
    pip install -r requirements.txt

Using Docker 🐳

  • Go to location using cmd or terminal

    cd env_docker
    docker compose -f docker-compose.yml up
    • Press Ctrl+C to stop and then run the following
    docker-compose -f docker-compose.yml down --volumes --rmi all 
  • Put the desired notebook in the notebook directory along with the data in the data folder.

Using Conda 🧶

  • Open your favourite terminal or cmd to download the dependencies listed in envALL.yml

    conda env create -f envALL.yml

Using uv

  • For Linux and macOS

    curl -LsSf <https://astral.sh/uv/install.sh> | sh
  • For Windows, use PowerShell:

    powershell -ExecutionPolicy ByPass -c "irm <https://astral.sh/uv/install.ps1> | iex"
  • If curl is not installed, use wget instead:

    wget -qO- <https://astral.sh/uv/install.sh> | sh
  • install it globally using

    pip install uv
  • Initialize a new Python project by running:

    uv init llms
  • To add a new package to pyproject.toml

    uv add numpy
  • To remove a new package

    uv remove numpy
  • Add all dependencies from requirements.txt

    uv add -r requirements.txt
  • Sync Dependencies

    uv pip compile .pyproject.toml -o requirements.in
  • Run main.py

    uv run main.py

References

  1. https://realpython.com/python-uv/
  2. https://docs.astral.sh/uv/guides/projects/