Bootstrap: docker From: python:3.11 %environment export DEBIAN_FRONTEND=noninteractive %post apt-get update && \ apt-get install -y --no-install-recommends \ ca-certificates \ build-essential \ git \ curl \ wget \ tmux \ htop \ nano \ vim \ pipx \ libreadline-dev \ libncursesw5-dev \ libssl-dev \ libsqlite3-dev \ libgdbm-dev \ libc6-dev \ libbz2-dev \ libffi-dev \ libpq-dev \ liblzma-dev \ libopenblas-dev \ libgl1-mesa-dev \ libglib2.0-0 \ libsm6 \ libxext6 \ ffmpeg \ tk-dev \ ninja-build && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* #pipx ensurepath --global && \ #pipx install poetry # Create the app directory at the top level of the container's filesystem mkdir -p /app # Navigate to the app directory cd /app # Create a virtual environment python -m venv myenv # Activate the virtual environment . /app/myenv/bin/activate # Upgrade pip pip install --no-cache-dir --upgrade pip pip install --no-cache-dir --upgrade poetry poetry config virtualenvs.create false --local %environment # Set the environment variable to activate the virtual environment by default . /app/myenv/bin/activate poetry config virtualenvs.create false --local %runscript # Activate the virtual environment . /app/myenv/bin/activate poetry config virtualenvs.create false --local # Run the given command exec "$@"