homeassistant-docker-venv icon indicating copy to clipboard operation
homeassistant-docker-venv copied to clipboard

Added and documented pip support for installing packages.

Open Paul-dH opened this issue 4 years ago • 3 comments

I run HA in a docker environment and wanted to use HACS. Therefore I added pip support to the script and tested it.

Thought I'd share the addition to the script :)

Paul-dH avatar Oct 16 '20 09:10 Paul-dH

Thanks for your contribution! Can you explain the use-case a bit more for me? Python packages should be installed by Homeassistant automatically according to the requirements of the respective compontents. I use HACS myself, and aiogithubapi (and others) are installed just fine.

tribut avatar Oct 16 '20 10:10 tribut

No problem :)

I'm currently busy setting up HA in docker on a Ubuntu server behind a reverse proxy. I kept getting permission errors so I landed at the community post where this repo was mentioned. After I changed the composefile and added the run script I saw that HA booted up and the only thing that failed were the python packages. That's why I added the ${PIP} part.

My composefile is like this:

version: '3.6'

services:
  homeassistant:
    image: homeassistant/home-assistant:stable
    container_name: home-assistant
    hostname: home-assistant
    restart: always
    ports:
      - '8123:8123'
      - '8943:8943'
    volumes:
      - ./config:/config
      - ./config/docker/run:/etc/services.d/home-assistant/run
    environment:
      - PUID=1000
      - PGID=1000
      - UMASK=007
      - PIP=aiogithubapi
    networks:
      - proxy-tier

networks:
  proxy-tier:
    external:
      name: proxy-tier

Paul-dH avatar Oct 16 '20 12:10 Paul-dH

I've tried to use your config, but cannot reproduce the problem. Have you by chance tried again without your changes since? I understand this PR has been open a very long time, but since nobody else seems to be having problems with pip-packages I am really hesitant to add this without understanding what goes wrong...

tribut avatar Jul 14 '21 16:07 tribut