GithubHelp home page GithubHelp logo

ludeeus / container Goto Github PK

View Code? Open in Web Editor NEW
22.0 2.0 13.0 620 KB

Custom containers for various usecases

Home Page: https://github.com/ludeeus?tab=packages&repo_name=container

License: MIT License

Shell 59.15% Python 30.40% Makefile 10.45%
devcontainer vscode homeassistant integration docker container node python development development-environment

container's Introduction

container's People

Contributors

dependabot[bot] avatar edenhaus avatar elahd avatar github-actions[bot] avatar helto4real avatar ludeeus avatar msvinth avatar rohankapoorcom avatar swartjean avatar therealwaldo avatar xannor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

container's Issues

Cannot run set-version

When I try to change the version in the container set-version kicks back with an error of:

/opt/container/helpers/common/homeassistant/set-version.sh: line 3: read: `Set Home Assistant version: ': not a valid identifier

I checked the line and I think the -r is in the wrong spot, if I move the -r to before -r or to after the prompt it will prompt me from the command line.

I will submit a PR for this.

Two Enhancements: "Integration + Python Library" and "Include Home Assistant Pylint Plugins"

Hi @ludeeus: I'm proposing two enhancements to your Home Assistant integration development container. I can do the work to build this, just looking for sign off before I commit to doing the work.

  1. Integration + Python Library: Many HA integration developers work on their integration and its associated python library side-by-side. It would be great if the devcontainer could pull down the associated library via git and install it via pip in editable mode (a.k.a. setuptools development mode).
  2. Include Home Assistant Pylint Plugins: Home Assistant provides custom Pylint plugins to help validate code. These plugins are specific to each version of Home Assistant. Integration developers using pylint can also use these plugins when developing, but keeping them up to date is a pain--they change monthly. It would be great if the devcontainer could extract the pylint/plugins folder when installing Home Assistant and place it in a consistent location (e.g.: /ha-dev/pylint/plugins) for referencing from pyproject.toml.

Thoughts?

Unable to install pillow

Been quite awhile since I used the devcontainer for custom cards, so maybe I missed some change along the way?

container# container start
...
bunch of errors about pillow
...
2020-10-20 05:24:06 ERROR (SyncWorker_8) [homeassistant.util.package] Unable to install package pillow==7.2.0: ERROR: Operation cancelled by user
WARNING: You are using pip version 20.1; however, version 20.2.4 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
container# pip3 install pillow==7.2.0
Collecting pillow==7.2.0
  Downloading Pillow-7.2.0.tar.gz (39.1 MB)
     |████████████████████████████████| 39.1 MB 10.4 MB/s 
Building wheels for collected packages: pillow
  Building wheel for pillow (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5advjovf/pillow/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5advjovf/pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-hv5eev64
       cwd: /tmp/pip-install-5advjovf/pillow/
  Complete output (170 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.8
  creating build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/PdfParser.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/PcxImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/FontFile.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageTk.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/BufrStubImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/TarIO.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/WmfImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ExifTags.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/BlpImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/FliImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/_binary.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/DcxImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/SpiderImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageWin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/MspImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageShow.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/_tkinter_finder.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImagePath.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/IcoImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/PyAccess.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/EpsImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/XpmImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageColor.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/TgaImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/FitsStubImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageFont.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/IptcImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageDraw2.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/Image.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/JpegImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/FtexImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/CurImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/PpmImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/MpoImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/GbrImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/PdfImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/SunImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageFile.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/MicImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/PcdImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageOps.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/XbmImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/BmpImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageChops.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageCms.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ContainerIO.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/features.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImagePalette.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/_util.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageTransform.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/PaletteFile.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/PalmImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/JpegPresets.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/__main__.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageDraw.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/MpegImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/GifImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/FpxImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/WebPImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/_version.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageStat.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/GribStubImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/WalImageFile.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/SgiImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/PcfFontFile.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageMorph.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageEnhance.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/XVThumbImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/GdImageFile.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/IcnsImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageSequence.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/PngImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/BdfFontFile.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/DdsImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/__init__.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImtImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageGrab.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/PsdImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageMath.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/PixarImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/GimpPaletteFile.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/GimpGradientFile.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/TiffTags.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/McIdasImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageFilter.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/PSDraw.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/TiffImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageMode.py -> build/lib.linux-x86_64-3.8/PIL
  copying src/PIL/ImageQt.py -> build/lib.linux-x86_64-3.8/PIL
  running egg_info
  writing src/Pillow.egg-info/PKG-INFO
  writing dependency_links to src/Pillow.egg-info/dependency_links.txt
  writing top-level names to src/Pillow.egg-info/top_level.txt
  reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  warning: no files found matching '*.c'
  warning: no files found matching '*.h'
  warning: no files found matching '*.sh'
  warning: no previously-included files found matching '.appveyor.yml'
  warning: no previously-included files found matching '.coveragerc'
  warning: no previously-included files found matching '.editorconfig'
  warning: no previously-included files found matching '.readthedocs.yml'
  warning: no previously-included files found matching 'codecov.yml'
  warning: no previously-included files matching '.git*' found anywhere in distribution
  warning: no previously-included files matching '*.pyc' found anywhere in distribution
  warning: no previously-included files matching '*.so' found anywhere in distribution
  no previously-included directories found matching '.ci'
  writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
  running build_ext
  
  
  The headers or library files could not be found for zlib,
  a required dependency when compiling Pillow from source.
  
  Please see the install instructions at:
     https://pillow.readthedocs.io/en/latest/installation.html
  
  Traceback (most recent call last):
    File "/tmp/pip-install-5advjovf/pillow/setup.py", line 864, in <module>
      setup(
    File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
      return distutils.core.setup(**attrs)
    File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 290, in run
      self.run_command('build')
    File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/lib/python3.8/distutils/command/build_ext.py", line 340, in run
      self.build_extensions()
    File "/tmp/pip-install-5advjovf/pillow/setup.py", line 694, in build_extensions
      raise RequiredDependencyException(f)
  __main__.RequiredDependencyException: zlib
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-install-5advjovf/pillow/setup.py", line 918, in <module>
      raise RequiredDependencyException(msg)
  __main__.RequiredDependencyException:
  
  The headers or library files could not be found for zlib,
  a required dependency when compiling Pillow from source.
  
  Please see the install instructions at:
     https://pillow.readthedocs.io/en/latest/installation.html
  
  
  ----------------------------------------
  ERROR: Failed building wheel for pillow
  Running setup.py clean for pillow
Failed to build pillow
Installing collected packages: pillow
    Running setup.py install for pillow ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5advjovf/pillow/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5advjovf/pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-s_u4p268/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/pillow
         cwd: /tmp/pip-install-5advjovf/pillow/
    Complete output (172 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.8
    creating build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/PdfParser.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/PcxImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/FontFile.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageTk.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/BufrStubImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/TarIO.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/WmfImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ExifTags.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/BlpImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/FliImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/_binary.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/DcxImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/SpiderImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageWin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/MspImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageShow.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/Hdf5StubImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/_tkinter_finder.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImagePath.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/IcoImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/PyAccess.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/EpsImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/XpmImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageColor.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/TgaImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/FitsStubImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageFont.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/IptcImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageDraw2.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/Image.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/JpegImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/FtexImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/CurImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/PpmImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/MpoImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/GbrImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/PdfImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/SunImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageFile.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/MicImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/PcdImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageOps.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/XbmImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/BmpImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageChops.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageCms.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ContainerIO.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/features.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImagePalette.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/_util.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageTransform.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/PaletteFile.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/PalmImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/JpegPresets.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/__main__.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageDraw.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/MpegImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/GifImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/Jpeg2KImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/FpxImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/WebPImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/_version.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageStat.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/GribStubImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/WalImageFile.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/SgiImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/PcfFontFile.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageMorph.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageEnhance.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/XVThumbImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/GdImageFile.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/IcnsImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageSequence.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/PngImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/BdfFontFile.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/DdsImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/__init__.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImtImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageGrab.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/PsdImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageMath.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/PixarImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/GimpPaletteFile.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/GimpGradientFile.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/TiffTags.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/McIdasImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageFilter.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/PSDraw.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/TiffImagePlugin.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageMode.py -> build/lib.linux-x86_64-3.8/PIL
    copying src/PIL/ImageQt.py -> build/lib.linux-x86_64-3.8/PIL
    running egg_info
    writing src/Pillow.egg-info/PKG-INFO
    writing dependency_links to src/Pillow.egg-info/dependency_links.txt
    writing top-level names to src/Pillow.egg-info/top_level.txt
    reading manifest file 'src/Pillow.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching '*.c'
    warning: no files found matching '*.h'
    warning: no files found matching '*.sh'
    warning: no previously-included files found matching '.appveyor.yml'
    warning: no previously-included files found matching '.coveragerc'
    warning: no previously-included files found matching '.editorconfig'
    warning: no previously-included files found matching '.readthedocs.yml'
    warning: no previously-included files found matching 'codecov.yml'
    warning: no previously-included files matching '.git*' found anywhere in distribution
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*.so' found anywhere in distribution
    no previously-included directories found matching '.ci'
    writing manifest file 'src/Pillow.egg-info/SOURCES.txt'
    running build_ext
    
    
    The headers or library files could not be found for zlib,
    a required dependency when compiling Pillow from source.
    
    Please see the install instructions at:
       https://pillow.readthedocs.io/en/latest/installation.html
    
    Traceback (most recent call last):
      File "/tmp/pip-install-5advjovf/pillow/setup.py", line 864, in <module>
        setup(
      File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.8/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.8/distutils/command/install.py", line 545, in run
        self.run_command('build')
      File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.8/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.8/distutils/command/build_ext.py", line 340, in run
        self.build_extensions()
      File "/tmp/pip-install-5advjovf/pillow/setup.py", line 694, in build_extensions
        raise RequiredDependencyException(f)
    __main__.RequiredDependencyException: zlib
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-5advjovf/pillow/setup.py", line 918, in <module>
        raise RequiredDependencyException(msg)
    __main__.RequiredDependencyException:
    
    The headers or library files could not be found for zlib,
    a required dependency when compiling Pillow from source.
    
    Please see the install instructions at:
       https://pillow.readthedocs.io/en/latest/installation.html
    
    
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5advjovf/pillow/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5advjovf/pillow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-s_u4p268/install-record.txt --single-version-externally-managed --compile --install-headers /usr/include/python3.8/pillow Check the logs for full command output.

Bypass HA initial configuration

For example, would it be possible to have a default user, like Administrator (admin/admin), with Advanced mode already enabled, and bypassing the initial home configuration with some fake data to speed up the onboarding process?

ludeeus/container:netdaemon init

When user is asked for token it is using longiture (could be altitude).
Was thinking contributing a PR but could not find the script :)

Git unreachable

Hi, ive been wall blocked by this issue, so asking here if this is something wrong with my setup or the container itself.

I am using the "image": "ludeeus/container:integration"

After my devcontainer starts up, and when I run container start, I get the following message:

container# container start
Copy configuration.yaml
Symlink the custom component directory
Start Home Assistant
Home Assistant is not installed, running installation.
Collecting git+git://github.com/home-assistant/home-assistant.git@dev
  Cloning git://github.com/home-assistant/home-assistant.git (to revision dev) to /tmp/pip-req-build-2ew5qp5_
ERROR: Command errored out with exit status 128: git clone -q git://github.com/home-assistant/home-assistant.git /tmp/pip-req-build-2ew5qp5_ Check the logs for full command output.
/usr/share/container/start: line 36: hass: command not found

If I just do

git clone -q git://github.com/home-assistant/home-assistant.git

I get

fatal: unable to look up github.com (port 9418) (Try again)

It seems my devcontainer is not able to reach github.com or the git:// protocol.
Any ideas what I could do to fix this?

Support linking custom front-end via mounts

When I follow the instructions to link a custom development front-end to the devcontainer, I receive the following errors. I haven't been able to get it working yet.

Unable to create default configuration file /config/configuration.yaml

log

container# container start
Copy configuration.yaml
Symlink the custom component directory
Start Home Assistant
Unable to find configuration. Creating default one in /config
Unable to create default configuration file /config/configuration.yaml
2021-01-13 19:13:48 ERROR (MainThread) [homeassistant.bootstrap] Error getting configuration path

configuration.yaml

frontend:
  development_repo: /workspaces/frontend

devcontainer.json

	"mounts": [
		"source=/Users/mick/Projects/personal-projects/home-assistant/frontend,target=/workspaces/frontend,type=bind,consistency=cached"
	],

Cannot start devcontainer on GitHub Codespaces

Thanks for providing a devcontainer! It has been a great help in the past time to develop a custom component, making it easy for new contributors to join your existing project.

I would like to develop on GitHub Codespaces, however I am not able to run the devcontainer. The Home Assistant Core devcontainer runs like a charm, thus that makes me very jealous 😉.

Probably related to #228, however I wonder if I am perhaps pulling the wrong container image, which doesn't contain the fix. I am trying to set this up for https://github.com/iMicknl/ha-nest-protect.

Container definition:

// See https://aka.ms/vscode-remote/devcontainer.json for format details.
{
	"image": "ghcr.io/ludeeus/devcontainer/integration:latest",
	"name": "ha-nest-protect",
	"context": "..",
	"appPort": [
		"8123:8123"
	],
	"containerEnv": {
		"WORKSPACE_DIRECTORY": "/workspaces/ha-nest-protect"
	},
	"postCreateCommand": "container install && pip install -r requirements_dev.txt && pre-commit install && pre-commit install-hooks",
	"extensions": [
		"ms-python.python",
		"github.vscode-pull-request-github",
		"github.copilot",
		"ms-python.vscode-pylance"
	],
	"settings": {
		"files.eol": "\n",
		"editor.tabSize": 4,
		"terminal.integrated.defaultProfile.linux": "bash",
		"terminal.integrated.profiles.linux": {
			"zsh": {
				"path": "/bin/bash"
			}
		},
		"python.analysis.autoSearchPaths": false,
		"python.linting.pylintEnabled": true,
		"python.linting.enabled": true,
		"python.linting.pylintArgs": [
			"--disable",
			"import-error"
		],
		"python.formatting.provider": "black",
		"editor.formatOnPaste": false,
		"editor.formatOnSave": true,
		"editor.formatOnType": true,
		"files.trimTrailingWhitespace": true,
		"python.linting.mypyEnabled": true,
		"python.defaultInterpreterPath": "/usr/local/bin/python",
		"python.formatting.blackPath": "/usr/local/bin/black",
		"python.linting.banditPath": "/usr/local/bin/bandit",
		"python.linting.flake8Path": "/usr/local/bin/flake8",
		"python.linting.mypyPath": "/usr/local/bin/mypy",
		"python.linting.pycodestylePath": "/usr/local/bin/pycodestyle",
		"python.linting.pylintPath": "/usr/local/bin/pylint",
		"python.sortImports.path": "/usr/local/bin/isort",
	}
}

In my .devcontainer folder, I also have a configuration.yaml file.

Error:

@iMicknl ➜ /workspaces/ha-nest-protect (main ✗) $ container start
Copy configuration.yaml
Symlink the custom component directory
Start Home Assistant
Unable to find configuration. Creating default one in /config
Unable to create default configuration file /config/configuration.yaml
Configuration file: False
Unable to find configuration. Creating default one in /config
Unable to create default configuration file /config/configuration.yaml
2022-03-02 10:24:56 ERROR (MainThread) [homeassistant.bootstrap] Error getting configuration path
make: *** [/opt/container/makefiles/integration.mk:2: start] Error 1

How to add breakpoints in custom integration code ?

Hello,

I'm developping a custom integration and for debugging purpose I wanted to be able to add some breakpoints in my code.

Is that possible when using the following image:

"image": "ghcr.io/ludeeus/devcontainer/integration:latest",

I try to add :
debugpy:
start: true
wait: false
port: 5678

in my configuration.yaml.

The debugger starts well, connect to local instance without problem but never stops to the breakpoints I give.

I try modifying this configuration without success in my launch.json:

{
      // Example of attaching to local debug server
      "name": "Python: Attach Local",
      "type": "python",
      "request": "attach",
      "port": 5678,
      "host": "localhost",
      "justMyCode": false,
      "pathMappings": [
        {
          "localRoot": "${workspaceFolder}",
          "remoteRoot": "."
        },
        {
          "localRoot": "${workspaceFolder}/custom_component/versatile_thermostat",
          "remoteRoot": "/config/custom_component/versatile_thermostat"
        }
      ]
    },

Maybe this config is not good but I can't find out how to configure this.

Any help would be greatly appreciated

Persistent hass config

Thanks for your great work on this container. One inconvenience I've noticed when using this for custom component development is that everytime I need to update the devcontainer, the hass config instance data is wiped and I need to re-setup hass again. Is there a way to save the hass data locally say in a "/hass" folder and mount it in so that it will persist across devcontainer updates?

Integration container on m1 mac

Hi @ludeeus 👋 !

thanks for your awesome work here! I currently try to help on this project with the devContainer but it's very slow on my mac because the container is only compiled for amd64. I see by reading your code that your are able to publish arm64 base images for alpine. I guess you are no far to publish the integration container in arm64.

I'm not a Docker expert by any means and I don't fully understand your code so I couldn't figure out how to create a PR for this sorry.

Can you help me?

Container start fails on monster image

It seems that HA cannot properly initialize itself due to some dependency issues:

error: can't find Rust compiler
  
  If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
  
  To update pip, run:
  
      pip install --upgrade pip
  
  and then retry package installation.
  
  If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
  
  This package requires Rust >=1.41.0.
  ----------------------------------------
  ERROR: Failed building wheel for cryptography
Successfully built homeassistant
Failed to build cryptography
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly

How to reproduce:

Python version

Any specific reason for the devcontainer to be at Python 3.10 when Home Assistant it self is build for 3.9?

Just ran into an issue where var:str | None caused some errors, as this syntax isn't valid in version 3.9

The unauthenticated git protocol is no longer supported

When I try to initialize devcontainer I get an error:

ERROR: Command errored out with exit status 128: git clone -q git://github.com/home-assistant/home-assistant.git /tmp/pip-req-build-rr1_lab5 Check the logs for full command output.

Detailed log:

fatal: remote error: 
  The unauthenticated git protocol on port 9418 is no longer supported.
Please see https://github.blog/2021-09-01-improving-git-protocol-security-github/ for more information.

Please, replace git:// to https:// in code and update docker images on DockerHub.

Feature request: Support secrets.yaml in .devcontainer folder

I am using your very nice devcontainer and is developing an integration which needs credentials. In this case it would be nice if there was support for adding secrets.yaml in the .devcontainer folder so !secret could be used in configuration.yaml.

container expects only 1 folder in workspaces

I am using your integeration container to work on a new component and I need it and its supporting library in the dev environment. Unfortunately your GetWorkspaceName function expects only one folder under /workspaces and two caused it to fail.

I figures out a modification to it that handles only 1 subfolder with a custom_components folder.

find /workspaces -mindepth 2 -maxdepth 2 -type d -name custom_components -exec dirname {} \;

container start terminated with exit code: 1

I don't think I changed anything recently, and it worked fine a month or two ago, but when I went to run the container recently I got this error:

  • Executing task: container start

Copy configuration.yaml
Symlink the custom component directory
Start Home Assistant
2022-08-22 05:15:09.897 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration tplink_deco which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant

  • The terminal process "/bin/bash '-c', 'container start'" terminated with exit code: 1.
  • Terminal will be reused by tasks, press any key to close it.

If I delete all my custom component files, the same problem happens but without the warning message for the custom component.

Any idea what's wrong? Or how to get more error ouput?

postCreateCommand fails on opening repo in Remote-Container

When opening the repository as Remote-Container in VSCode I get an error:

postCreateCommand failed with exit code 2. Skipping any further user-provided commands.

As a result I can't use the CLI. All container commands returning something like:

root ➜ /workspaces/container (main) $ container init
make: *** No rule to make target 'init'.  Stop.
root ➜ /workspaces/container (main) $ 

**** log ****

bash include
include: include: Is a directory
make: *** [Makefile:9: init] Error 126
[245824 ms] postCreateCommand failed with exit code 2. Skipping any further user-provided commands.
[245824 ms] Error: Command failed: /bin/sh -c make init
[245824 ms]     at dL (c:\Users\rudolf\.vscode\extensions\ms-vscode-remote.remote-containers-0.255.4\dist\spec-node\devContainersSpecCLI.js:1683:137)
[245825 ms]     at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
[245825 ms]     at async Promise.all (index 0)
[245825 ms]     at async wg (c:\Users\rudolf\.vscode\extensions\ms-vscode-remote.remote-containers-0.255.4\dist\spec-node\devContainersSpecCLI.js:1676:3580)
[245825 ms]     at async xg (c:\Users\rudolf\.vscode\extensions\ms-vscode-remote.remote-containers-0.255.4\dist\spec-node\devContainersSpecCLI.js:1676:2837)
[245825 ms]     at async wae (c:\Users\rudolf\.vscode\extensions\ms-vscode-remote.remote-containers-0.255.4\dist\spec-node\devContainersSpecCLI.js:1994:22003)
[245825 ms]     at async xae (c:\Users\rudolf\.vscode\extensions\ms-vscode-remote.remote-containers-0.255.4\dist\spec-node\devContainersSpecCLI.js:1994:19839)
[245836 ms] Exit code 1
[245836 ms] Command failed: C:\Program Files\Microsoft VS Code\Code.exe --ms-enable-electron-run-as-node c:\Users\rudolf\.vscode\extensions\ms-vscode-remote.remote-containers-0.255.4\dist\spec-node\devContainersSpecCLI.js run-user-commands --user-data-folder c:\Users\rudolf\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-containers\data --workspace-folder c:\_git\private\container --id-label devcontainer.local_folder=c:\_git\private\container --container-id f9d20a322dd460553202b6b557c949e9d050ad64c7e2846824d443f3401d53d9 --log-level debug --log-format json --config c:\_git\private\container\.devcontainer\devcontainer.json --default-user-env-probe loginInteractiveShell --skip-non-blocking-commands false --prebuild false --stop-for-personalization true --remote-env SSH_AUTH_SOCK=/tmp/vscode-ssh-auth-633bb7631a244f41431686d7ba71b53e29adaf0d.sock --remote-env REMOTE_CONTAINERS_IPC=/tmp/vscode-remote-containers-ipc-633bb7631a244f41431686d7ba71b53e29adaf0d.sock --remote-env REMOTE_CONTAINERS=true --mount-workspace-git-root true --terminal-columns 218 --terminal-rows 13

Custom initialization script

Please add the ability to execute a custom shell script stored in .devcontainer/ right after the container is initialized.

It is impossible to do without this, for example, in the case of testing a custom component, which requires a library from a temporarily private repository.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.