Skip to content

Commit

Permalink
Pass all unit tests on Raspberry Pi
Browse files Browse the repository at this point in the history
  • Loading branch information
JDRomano2 authored and Jay Moran committed Aug 20, 2022
1 parent 4c51d01 commit 90bb821
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 10 deletions.
4 changes: 4 additions & 0 deletions tests/unit/requirements-rpi.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
coverage==5.3
nose==1.3.7
nose-htmloutput==0.6.0
parameterized==0.7.0
39 changes: 29 additions & 10 deletions tests/unit/rpi.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,53 @@
FROM python:3.7.4-stretch
FROM ubuntu:bionic

RUN apt-get update && apt-get install -y wget xz-utils curl

#nodejs
RUN wget --quiet https://nodejs.org/dist/v11.14.0/node-v11.14.0-linux-x64.tar.xz -O ~/node.tar.xz && \
RUN wget --quiet https://nodejs.org/dist/v11.14.0/node-v11.14.0-linux-arm64.tar.xz -O ~/node.tar.xz && \
tar -xvf ~/node.tar.xz -C /opt/ && \
rm ~/node.tar.xz
ENV PATH /opt/node-v11.14.0-linux-x64/bin:$PATH
ENV PATH /opt/node-v11.14.0-linux-arm64/bin:$PATH

RUN apt-get update --fix-missing \
&& apt-get install -y --no-install-recommends \
graphviz dos2unix && \
graphviz dos2unix python3-numpy libatlas-base-dev gfortran libgfortran5 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Ensure specific python version
# See: https://stackoverflow.com/a/58562728/1730417
# and: https://askubuntu.com/a/1176271/260220
RUN apt-get update && apt-get install -y software-properties-common
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update
RUN apt-get install -y python3.7 python3.7-dev python3.7-distutils
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.7 1
RUN update-alternatives --set python /usr/bin/python3.7
RUN curl -s https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python get-pip.py --force-reinstall && \
rm get-pip.py

RUN npm install -g mocha

RUN pip install --upgrade pip

## tests
COPY /tests/unit/requirements.txt /root/test_requirements.txt
COPY /tests/unit/requirements-rpi.txt /root/test_requirements.txt
RUN pip install --no-cache-dir -r /root/test_requirements.txt

## machine and lab container
COPY /docker/lab/files/requirements.txt /root/lab_requirements.txt
RUN pip install --no-cache-dir -r /root/lab_requirements.txt
RUN mkdir /root/wheel
COPY /docker/pennai-arm64-deps/lab/wheel/*.whl /root/wheel/
COPY /docker/pennai-arm64-deps/machine/wheel/*.whl /root/wheel/
COPY /docker/lab/files/requirements-raspberrypi.txt /root/lab_requirements.txt
RUN pip3 install --no-index --find-links=/root/wheel -r /root/lab_requirements.txt

COPY /docker/machine/files/requirements.txt /root/mach_requirements.txt
RUN pip install --no-cache-dir -r /root/mach_requirements.txt
COPY /docker/machine/files/requirements-raspberrypi.txt /root/mach_requirements.txt
RUN pip install --no-index --find-links=/root/wheel -r /root/mach_requirements.txt

### Bill's surprise fork
RUN pip install --no-cache-dir git+https://github.com/lacava/[email protected]
#RUN pip install --verbose --verbose --verbose --no-cache-dir git+https://github.com/lacava/[email protected]
RUN pip install --no-index --find-links=/root/wheel scikit_surprise


# install lab/node_modules to an anon volume
Expand Down

0 comments on commit 90bb821

Please sign in to comment.