Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile updates and test #1447

Merged
merged 26 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
da280ac
Dockerfile updates and test
richard-rogers Jan 2, 2024
4a494a4
Merge branch 'mainline' into dev/richard/1440
richard-rogers Jan 2, 2024
a2e2795
Update docker-test.yml
richard-rogers Jan 2, 2024
4286435
pre-commit
richard-rogers Jan 2, 2024
7c9ad95
test script fixes
richard-rogers Jan 2, 2024
e05f5cf
Merge branch 'mainline' into dev/richard/1440
richard-rogers Jan 8, 2024
082db59
Merge branch 'mainline' into dev/richard/1440
richard-rogers Jan 8, 2024
71331bc
file must exist in mainline before workflow can be tested on a branch
richard-rogers Jan 9, 2024
c22099f
Revert "file must exist in mainline before workflow can be tested on …
richard-rogers Jan 10, 2024
20e0a8b
Merge branch 'mainline' into dev/richard/1440
jamie256 Jan 16, 2024
190fc18
Merge branch 'mainline' into dev/richard/1440
richard-rogers Mar 1, 2024
030cd31
update
richard-rogers Mar 1, 2024
0bb9778
rename Dockerfile.dev
richard-rogers Mar 1, 2024
35f389c
add uses
richard-rogers Mar 1, 2024
0e227a5
non-interactive
richard-rogers Mar 1, 2024
3dc1390
debugging
richard-rogers Mar 1, 2024
d8a16d6
debugging
richard-rogers Mar 1, 2024
aba1c65
debugging
richard-rogers Mar 1, 2024
354b39a
debugging
richard-rogers Mar 1, 2024
ad3c95e
debugging
richard-rogers Mar 1, 2024
a9c6431
set UID
richard-rogers Mar 4, 2024
8041d37
oops s/1000/1001/
richard-rogers Mar 4, 2024
66ec9e3
remove sudo
richard-rogers Mar 4, 2024
ce7fa9b
run as root :(
richard-rogers Mar 4, 2024
af6eb1b
remove debugging cruft
richard-rogers Mar 4, 2024
930aff5
meet at midnight in the hanging tree
richard-rogers Mar 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
LICENSE
README.md
docker_test.sh
java
proto
python
15 changes: 15 additions & 0 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Nightly Docker test
FelipeAdachi marked this conversation as resolved.
Show resolved Hide resolved

on:
schedule:
- cron "0 0 * * *"

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Test Dockerfile.dev
run: |
docker build -t whylogs -f Dockerfile.dev .
docker run --rm -it -v $(pwd):/workspace whylogs docker_test.sh
28 changes: 15 additions & 13 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
FROM python:3.8

RUN mkdir /workspace && \
apt-get update
ENV PROTOBUF_VERSION=3.19.4
# cd whylogs
# docker build -t whylogs -f Dockerfile.dev .
# docker run --rm -it -p 8080:8888 -v /working/directory:/workspace whylogs

RUN mkdir /workspace
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get install apt-utils -y -q
RUN apt-get install git -y && \
RUN apt-get update && apt-get install apt-utils -y -q
RUN apt-get update && \
apt-get install git -y && \
apt-get install awscli -y && \
apt-get install sudo -y && \
adduser --quiet --disabled-password --gecos "" whyuser && \
adduser whyuser sudo && \
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

RUN curl -sLJO https://github.com/protocolbuffers/protobuf/releases/download/v3.19.2/protoc-3.19.2-linux-x86_64.zip && \
RUN curl -sLJO https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_VERSION}/protoc-${PROTOBUF_VERSION}-linux-x86_64.zip && \
unzip protoc-*-linux-x86_64.zip -d /usr && \
chmod -R a+rx /usr/bin/ /usr/include/google
RUN apt-get install cmake -y && \
RUN apt-get update && \
apt-get install -y cmake openjdk-17-jre-headless graphviz && \
pip install --root-user-action ignore --upgrade pip && \
pip install --root-user-action ignore pytest && \
pip install --root-user-action ignore pytest-cov && \
pip install --root-user-action ignore jupyterlab && \
pip install --root-user-action ignore numpy && \
pip install --root-user-action ignore pandas && \
pip install --root-user-action ignore sphinx
RUN apt-get install openjdk-17-jre-headless -y
RUN apt-get install graphviz -y && \
curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && \
apt-get install nodejs npm -y
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && \
apt-get update && apt-get install nodejs npm -y
RUN npm install --global yarn
RUN curl -sLJO "https://gitlab-runner-downloads.s3.amazonaws.com/latest/deb/gitlab-runner_amd64.deb" && \
dpkg -i gitlab-runner_amd64.deb

RUN apt-get install less -y && \
apt-get install emacs -y && \
apt-get install vim -y
RUN apt-get update && apt-get install -y less emacs vim

USER whyuser

Expand Down
7 changes: 7 additions & 0 deletions docker_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#! /bin/sh

git config --global --add safe.directory /workspace
export PATH=$PATH:/home/whyuser/.local/bin
cd /workspace/python
make install
make test