Skip to content

Commit

Permalink
Dockerfile updates and test
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-rogers committed Jan 2, 2024
1 parent a90e7c7 commit da280ac
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 13 deletions.
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

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
4 changes: 4 additions & 0 deletions docker_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /bin/sh

cd python
make install test

0 comments on commit da280ac

Please sign in to comment.