diff --git a/docker/dbmongo/Dockerfile b/docker/dbmongo/Dockerfile index 0f0d9ec96..b86dbba5f 100644 --- a/docker/dbmongo/Dockerfile +++ b/docker/dbmongo/Dockerfile @@ -1,8 +1,10 @@ -FROM ubuntu:xenial +FROM mongo:4.4.18 WORKDIR /opt/ ARG docker_filepath=docker/dbmongo/files +RUN apt-get update && apt-get install -y dos2unix + # RUN apt-get update # RUN apt-get install gpg wget # RUN wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | gpg --dearmor - | sudo tee /usr/share/keyrings/kitware-archive-keyring.gpg >/dev/null @@ -10,14 +12,14 @@ ARG docker_filepath=docker/dbmongo/files #add repo for mongodb -RUN echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list -RUN apt-get update --fix-missing && \ - apt-get install -y --allow-unauthenticated \ - vim mongodb-org npm openssh-client htop dos2unix \ - net-tools iputils-ping \ - --no-install-recommends && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* +# RUN echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-3.2.list +# RUN apt-get update --fix-missing && \ +# apt-get install -y --allow-unauthenticated \ +# vim mongodb-org npm openssh-client htop dos2unix \ +# net-tools iputils-ping \ +# --no-install-recommends && \ +# apt-get clean && \ +# rm -rf /var/lib/apt/lists/* #check if we need to rebuild COPY ${docker_filepath}/mongod.conf /etc/ @@ -28,6 +30,7 @@ COPY ${docker_filepath}/sync.sh /root/ RUN dos2unix /root/entrypoint.sh /root/sync.sh RUN dos2unix /root/users.json /root/projects.json RUN dos2unix /etc/mongod.conf +RUN apt-get remove -y dos2unix && apt-get clean EXPOSE 27017 diff --git a/docker/lab/Dockerfile b/docker/lab/Dockerfile index 00365d917..7b90a853f 100644 --- a/docker/lab/Dockerfile +++ b/docker/lab/Dockerfile @@ -1,23 +1,51 @@ -FROM python:3.7.11-stretch +# FROM python:3.7.11-stretch +FROM python:3.7.16-slim-buster #nodejs -RUN wget --quiet https://nodejs.org/dist/v12.22.9/node-v12.22.9-linux-x64.tar.xz -O ~/node.tar.xz && \ - tar -xvf ~/node.tar.xz -C /opt/ && \ - rm ~/node.tar.xz -ENV PATH /opt/node-v12.22.9-linux-x64/bin:$PATH - -ARG docker_filepath=docker/lab/files - -RUN apt-get update --fix-missing && apt-get install -y \ - vim openssh-client openssh-server telnet apache2 \ - net-tools iputils-ping xz-utils \ - screen ngrep ca-cacert \ +# RUN wget --quiet https://nodejs.org/dist/v12.22.9/node-v12.22.9-linux-x64.tar.xz -O ~/node.tar.xz && \ +# tar -xvf ~/node.tar.xz -C /opt/ && \ +# rm ~/node.tar.xz +# ENV PATH /opt/node-v12.22.9-linux-x64/bin:$PATH + +RUN apt-get update --fix-missing && \ + apt-get install -y wget xz-utils git \ + openssh-client openssh-server telnet apache2 \ + net-tools iputils-ping \ + screen ngrep \ mercurial subversion \ - build-essential cmake lsb-core cpio mesa-common-dev \ + build-essential cmake cpio mesa-common-dev \ dos2unix \ --no-install-recommends && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* + ARCH= && dpkgArch="$(dpkg --print-architecture)" \ + && case "${dpkgArch##*-}" in \ + amd64) ARCH='x64';; \ + ppc64el) ARCH='ppc64le';; \ + s390x) ARCH='s390x';; \ + arm64) ARCH='arm64';; \ + armhf) ARCH='armv7l';; \ + i386) ARCH='x86';; \ + *) echo "unsupported architecture"; exit 1 ;; \ + esac \ + && wget --quiet https://nodejs.org/dist/v16.18.1/node-v16.18.1-linux-$ARCH.tar.xz -O ~/node.tar.xz && \ + tar -xvf ~/node.tar.xz -C /usr/local/ --strip-components=1 --no-same-owner && \ + rm ~/node.tar.xz && \ + ln -s /usr/local/bin/node /usr/local/bin/nodejs && \ + rm -rf /var/lib/apt/lists/* && \ + apt-get remove -y wget && \ + apt-get clean + +ARG docker_filepath=docker/lab/files + +# RUN apt-get update --fix-missing && apt-get install -y \ +# vim openssh-client openssh-server telnet apache2 \ +# net-tools iputils-ping xz-utils \ +# screen ngrep ca-cacert \ +# mercurial subversion \ +# build-essential cmake lsb-core cpio mesa-common-dev \ +# dos2unix \ +# --no-install-recommends && \ +# apt-get clean && \ +# rm -rf /var/lib/apt/lists/* # setup python environment COPY ${docker_filepath}/requirements.txt /root/ diff --git a/docker/lab/files/requirements.txt b/docker/lab/files/requirements.txt index 0adb3fbc5..a918995a9 100644 --- a/docker/lab/files/requirements.txt +++ b/docker/lab/files/requirements.txt @@ -1,11 +1,11 @@ -scikit-learn==0.22.1 -tqdm==4.32.2 -pymongo==3.8.0 -pandas==1.0.3 +scikit-learn==0.23.2 +tqdm==4.64.1 +pymongo==4.3.3 +pandas==1.0.5 numpy==1.19.5 -cython==0.29.2 -xgboost==0.82 -simplejson==3.16.0 -requests==2.22.0 -joblib==0.16.0 --e git+https://github.com/lacava/surprise.git@1.1.1.1#egg=scikit-surprise +cython==0.29.32 +xgboost==1.6.2 +simplejson==3.17.2 +requests==2.25.1 +joblib==1.2.0 +-e git+https://github.com/lacava/surprise.git@1.1.1.1#egg=scikit-surprise \ No newline at end of file diff --git a/docker/machine/Dockerfile b/docker/machine/Dockerfile index 292007c2d..80bf1d216 100644 --- a/docker/machine/Dockerfile +++ b/docker/machine/Dockerfile @@ -1,23 +1,39 @@ -FROM python:3.7.11-stretch +# FROM python:3.7.11-stretch +FROM python:3.7.16-slim-buster #nodejs -RUN wget --quiet https://nodejs.org/dist/v12.22.9/node-v12.22.9-linux-x64.tar.xz -O ~/node.tar.xz && \ - tar -xvf ~/node.tar.xz -C /opt/ && \ - rm ~/node.tar.xz -ENV PATH /opt/node-v12.22.9-linux-x64/bin:$PATH +# RUN wget --quiet https://nodejs.org/dist/v12.22.9/node-v12.22.9-linux-x64.tar.xz -O ~/node.tar.xz && \ +# tar -xvf ~/node.tar.xz -C /opt/ && \ +# rm ~/node.tar.xz +# ENV PATH /opt/node-v12.22.9-linux-x64/bin:$PATH ARG docker_filepath=docker/machine/files RUN apt-get update --fix-missing && apt-get install -y \ - vim openssh-client openssh-server graphviz \ + wget openssh-client openssh-server graphviz \ net-tools iputils-ping xz-utils \ - screen ngrep ca-cacert \ + screen ngrep \ mercurial subversion \ - build-essential cmake lsb-core cpio mesa-common-dev \ + build-essential cmake cpio mesa-common-dev \ libglib2.0-0 libxext6 libsm6 libxrender1 dos2unix \ --no-install-recommends && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* + ARCH= && dpkgArch="$(dpkg --print-architecture)" \ + && case "${dpkgArch##*-}" in \ + amd64) ARCH='x64';; \ + ppc64el) ARCH='ppc64le';; \ + s390x) ARCH='s390x';; \ + arm64) ARCH='arm64';; \ + armhf) ARCH='armv7l';; \ + i386) ARCH='x86';; \ + *) echo "unsupported architecture"; exit 1 ;; \ + esac \ + && wget --quiet https://nodejs.org/dist/v16.18.1/node-v16.18.1-linux-$ARCH.tar.xz -O ~/node.tar.xz && \ + tar -xvf ~/node.tar.xz -C /usr/local/ --strip-components=1 --no-same-owner && \ + rm ~/node.tar.xz && \ + ln -s /usr/local/bin/node /usr/local/bin/nodejs && \ + rm -rf /var/lib/apt/lists/* && \ + apt-get remove -y wget && \ + apt-get clean # setup python environment COPY ${docker_filepath}/requirements.txt /root/ diff --git a/docker/machine/files/requirements.txt b/docker/machine/files/requirements.txt index e03b94a8a..90f23bd0a 100644 --- a/docker/machine/files/requirements.txt +++ b/docker/machine/files/requirements.txt @@ -1,11 +1,11 @@ -scikit-learn==0.22.1 -tqdm==4.32.2 -pymongo==3.8.0 -pandas==1.0.3 +scikit-learn==0.23.2 +tqdm==4.64.1 +pymongo==4.3.3 +pandas==1.0.5 numpy==1.19.5 -matplotlib==3.1.0 +matplotlib==3.5.3 mlxtend==0.16.0 -pydot==1.4.1 -requests==2.22.0 -xgboost==0.90 -joblib==0.16.0 \ No newline at end of file +pydot==1.4.2 +requests==2.25.1 +xgboost==1.6.2 +joblib==1.2.0 \ No newline at end of file diff --git a/docs/guides/developerGuide.md b/docs/guides/developerGuide.md index 7d88a8d09..d1dd88033 100644 --- a/docs/guides/developerGuide.md +++ b/docs/guides/developerGuide.md @@ -111,6 +111,8 @@ The test results in html format can be found in the directory `.\target\test-rep Note: If the npm packages have been updated, the unit tests docker image need to be rebuild with `docker-compose -f .\docker-compose-unit-test.yml build` +Note: It is best to prune docker volumes with `docker volume prune -f` or `docker system prune -a -f --volumes` before running the unit and integration tests, otherwise there may be errors about not being able to upload duplicate datasets. + ### Integration - Type: Docker, runs [Jest](https://jestjs.io/) - Usage: `docker-compose -f .\docker-compose-int-test.yml up --abort-on-container-exit --force-recreate` diff --git a/lab/webapp/src/components/FileUploadOrigin/__snapshots__/fileUpload.test.js.snap b/lab/webapp/src/components/FileUploadOrigin/__snapshots__/fileUpload.test.js.snap new file mode 100644 index 000000000..658ba0312 --- /dev/null +++ b/lab/webapp/src/components/FileUploadOrigin/__snapshots__/fileUpload.test.js.snap @@ -0,0 +1,416 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`basic testing of FileUploadOrigin react component DONE - full component snapshot 1`] = ` +
+ Ordinal features have a discrete number of categories, and the categories have a logical order (rank). Some examples include size ("small", "medium", "large"), or rank results ("first", "second", "third").
+
+
+ You can specify these features and their rank in two ways:
+
+ 1) In the text input box opened by the button to the left, using the format described in the box
+
+ 2) or, in the Dataset Preview table below: use the dropdown boxes to specify ordinal features, then rank them using the drag-and-drop list of unique categories.
+
+ This site is using 'Categorical' to mean a Nominal feature, per custom in the ML community. Categorical features have a discrete number of categories that do not have an intrinsic order. Some examples include sex ("male", "female") or eye color ("brown", "green", "blue"...).
+
+
+ You can specify these features in two ways:
+
+ 1) In the text input box opened by the button to the left, using the format described in the box
+
+ 2) or, in the Dataset Preview table below: use the dropdown boxes to specify categorical features.
+
+ hi +
+ +`; diff --git a/runIntTest.sh b/runIntTest.sh new file mode 100755 index 000000000..cf3154f3d --- /dev/null +++ b/runIntTest.sh @@ -0,0 +1,4 @@ +#!/usr/bin/bash + +docker system prune -a -f --volumes +docker-compose -f docker-compose-int-test.yml up --abort-on-container-exit -V diff --git a/runUnitTest.sh b/runUnitTest.sh new file mode 100755 index 000000000..1a5365329 --- /dev/null +++ b/runUnitTest.sh @@ -0,0 +1,4 @@ +#!/usr/bin/bash + +docker system prune -a -f --volumes +docker-compose -f docker-compose-unit-test.yml up --abort-on-container-exit -V diff --git a/tests/integration/Dockerfile b/tests/integration/Dockerfile index 39bbd5e26..5590ff663 100644 --- a/tests/integration/Dockerfile +++ b/tests/integration/Dockerfile @@ -1,4 +1,4 @@ -FROM node:8.15.1-slim +FROM node:12.22.9-slim WORKDIR /src RUN apt-get update && apt-get install -y vim dos2unix diff --git a/tests/integration/jest/runExperiment_classificaion.test.ts b/tests/integration/jest/runExperiment_classificaion.test.ts index 4819a5149..3ac50fc25 100644 --- a/tests/integration/jest/runExperiment_classificaion.test.ts +++ b/tests/integration/jest/runExperiment_classificaion.test.ts @@ -76,7 +76,7 @@ describe('run experiment', () => { var count = 0 console.log("starting timeout...") // while (experimentResults._status === ('running') && count < 10) { - while (experimentResults._status === ('running') && count < 20) { + while (experimentResults._status === ('running') && count < 30) { util.delay(10000) count = count + 1 experimentResults = await labApi.fetchExperiment(submitResult._id) diff --git a/tests/unit/Dockerfile b/tests/unit/Dockerfile index e842fbd91..a71f2427f 100644 --- a/tests/unit/Dockerfile +++ b/tests/unit/Dockerfile @@ -1,10 +1,25 @@ -FROM python:3.7.11-stretch +FROM python:3.7.16-buster #nodejs -RUN wget --quiet https://nodejs.org/dist/v12.22.9/node-v12.22.9-linux-x64.tar.xz -O ~/node.tar.xz && \ - tar -xvf ~/node.tar.xz -C /opt/ && \ - rm ~/node.tar.xz -ENV PATH /opt/node-v12.22.9-linux-x64/bin:$PATH +RUN ARCH= && dpkgArch="$(dpkg --print-architecture)" \ + && case "${dpkgArch##*-}" in \ + amd64) ARCH='x64';; \ + ppc64el) ARCH='ppc64le';; \ + s390x) ARCH='s390x';; \ + arm64) ARCH='arm64';; \ + armhf) ARCH='armv7l';; \ + i386) ARCH='x86';; \ + *) echo "unsupported architecture"; exit 1 ;; \ + esac \ + && wget --quiet https://nodejs.org/dist/v12.22.9/node-v12.22.9-linux-$ARCH.tar.xz -O ~/node.tar.xz && \ + tar -xvf ~/node.tar.xz -C /usr/local/ --strip-components=1 --no-same-owner && \ + rm ~/node.tar.xz && \ + ln -s /usr/local/bin/node /usr/local/bin/nodejs + +# RUN wget --quiet https://nodejs.org/dist/v12.22.9/node-v12.22.9-linux-x64.tar.xz -O ~/node.tar.xz && \ +# tar -xvf ~/node.tar.xz -C /opt/ && \ +# rm ~/node.tar.xz +# ENV PATH /opt/node-v12.22.9-linux-x64/bin:$PATH RUN apt-get update --fix-missing \ && apt-get install -y --no-install-recommends \