Skip to content
Snippets Groups Projects
Select Git revision
  • 93ab05359458be8888ed8ba552198812795c96b0
  • main default protected
2 results

arm32v7.Dockerfile

Blame
  • arm32v7.Dockerfile 1.69 KiB
    FROM balenalib/raspberrypi4-64-python:3.9
    # The balena base image for building apps on Raspberry Pi 3. 
    # Raspbian Stretch required for piwheels support. https://downloads.raspberrypi.org/raspbian/images/raspbian-2019-04-09/
    
    # Enforces cross-compilation through Quemu
    RUN [ "cross-build-start" ]
    
    RUN echo "BUILD MODULE: CameraCapture"
    
    # Update package index and install dependencies
    #RUN install_packages \
    #    python3 \
    #    python3-pip \
    #    python3-dev \
    #    build-essential \
    
    RUN apt update && apt upgrade
    # Required for OpenCV
    RUN install_packages \
        # Hierarchical Data Format
        libhdf5-dev libhdf5-serial-dev \
        # for image files
        #libjpeg-dev libtiff5-dev libjasper-dev libpng-dev \
        # for video files
        libavcodec-dev libavformat-dev libswscale-dev libv4l-dev 
        # for gui
        #libqt4-test libqtgui4 libqtwebkit4 libgtk2.0-dev \
        # high def image processing
        #libilmbase-dev libopenexr-dev
    #RUN apt install libgl1
    #RUN apt-get install libilmbase-dev libopenexr-dev
    RUN install_packages libgl-dev
    
    # Install Python packages
    RUN pip install --upgrade pip
    RUN pip install --upgrade wheel
    RUN pip install --upgrade setuptools
    RUN pip install --upgrade requests
    #RUN install_packages python-requests
    COPY /build/arm32v7-requirements.txt ./
    #RUN pip3 install --upgrade setuptools
    #RUN pip install --index-url=https://www.piwheels.org/simple -r arm32v7-requirements.txt
    RUN pip install -r arm32v7-requirements.txt
    #RUN pip install iothub-client
    
    # Cleanup
    RUN rm -rf /var/lib/apt/lists/* \
        && apt-get -y autoremove
    
    RUN [ "cross-build-end" ]  
    
    ADD /app/ .
    
    # Expose the port
    EXPOSE 5012
    
    ENTRYPOINT [ "python3", "-u", "./main.py" ]