recreated the repository and collapsed commits down

This commit is contained in:
Victor Ng 2019-06-12 23:13:40 -04:00
Коммит db2f6b4143
6 изменённых файлов: 168 добавлений и 0 удалений

0
CHANGELOG Normal file
Просмотреть файл

61
Dockerfile Normal file
Просмотреть файл

@ -0,0 +1,61 @@
FROM ubuntu:cosmic-20190515
ENV PYTHONDONTWRITEBYTECODE 1
MAINTAINER Victor Ng <victor@crankycoder.com>
EXPOSE 8080
# add a non-privileged user for installing and running
# the application
RUN apt-get update && \
apt-get install -y sudo
RUN groupadd --gid 10001 app && \
useradd --uid 10001 --gid 10001 --home /app --create-home app && \
echo "app:docker" | chpasswd && adduser app sudo
# Set 'badpass' as the app password
RUN echo 'app:badpass' | chpasswd
RUN apt-get update && \
apt-get install -y bash build-essential curl gettext gfortran git libatlas3-base \
libbz2-dev libopenblas-dev libreadline-dev libsnappy-dev \
libsqlite3-dev libssl-dev locales make software-properties-common unzip \
vim wget zlib1g-dev
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash && apt-get install -y nodejs && apt-get clean
RUN rm -rf /var/lib/apt/lists/*
RUN update-locale LANG=C.UTF-8
# Install Java8
RUN wget --quiet https://github.com/frekele/oracle-java/releases/download/8u212-b10/jdk-8u212-linux-x64.tar.gz -O /tmp/jdk-8u212-linux-x64.tar.gz
RUN wget --quiet https://raw.githubusercontent.com/crankycoder/install-java/master/install-java.sh -O /tmp/install-java.sh
RUN chmod +x /tmp/install-java.sh && /tmp/install-java.sh -f /tmp/jdk-8u212-linux-x64.tar.gz
# Set default user
USER app
# Install pyenv
WORKDIR /app
RUN git clone git://github.com/yyuu/pyenv.git .pyenv
ENV HOME /app
ENV PYENV_ROOT $HOME/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN pyenv install 3.5.7
RUN pyenv rehash
# Install pyenv virtualenv
RUN git clone https://github.com/pyenv/pyenv-virtualenv.git $PYENV_ROOT/plugins/pyenv-virtualenv
RUN echo 'export PYENV_ROOT="$HOME/.pyenv"' >> /app/.bashrc
RUN echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> /app/.bashrc
RUN echo 'eval "$(pyenv init -)"' >> /app/.bashrc
# Setup locale for Python/Java bridge
RUN echo 'export LC_ALL=C.UTF-8' >> /app/.bashrc
RUN echo 'export LANG=C.UTF-8' >> /app/.bashrc

8
Makefile Normal file
Просмотреть файл

@ -0,0 +1,8 @@
bash:
docker-compose run --service-ports devshell
build:
docker-compose build devshell
root_shell:
docker-compose run --user root --service-ports devshell

21
README.md Normal file
Просмотреть файл

@ -0,0 +1,21 @@
# srg-python_mozetl
Stop futzing with setting up your python_mozetl dependencies.
You'll go mad.
This sets up a stock Ubuntu image with a working PySpark toolchain
that will pass all the mozilla/python_mozetl testsuite.
Run `make build` to build the image
Run `make bash` to run bash with ~/dev/ mounted into /app/src
The container has an enviroment variable set for HOST_IP which is your
host machine's IP address for en0
The default user is 'app' with a password set to 'badpass' with sudo
rights
TODO: add instructions on how to use pyenv-virtualenv to setup the
python 3.5 enviroment to run the python_mozetl testsuite

18
docker-compose.yml Normal file
Просмотреть файл

@ -0,0 +1,18 @@
version: "3.7"
services:
devshell:
environment:
# This expects that your host machine has something like :
# export HOST_IP=`ifconfig en0 | awk '/ *inet /{print $2}'`
# setup.
- HOST_IP=${HOST_IP}
build: .
expose:
- "8080"
ports:
- "8080:8080"
volumes:
- /Users/vng/dev:/app/src
- .:/app/dev
stdin_open: true
tty: true

60
etl-requirements.txt Normal file
Просмотреть файл

@ -0,0 +1,60 @@
arrow==0.10.0
atomicwrites==1.3.0
attrs==19.1.0
backcall==0.1.0
boto==2.49.0
boto3==1.9.87
botocore==1.10.84
certifi==2019.3.9
chardet==3.0.4
click==6.7
click-datetime==0.2
coverage==4.5.3
decorator==4.4.0
docutils==0.14
expiringdict==1.1.4
filelock==3.0.12
funcsigs==1.0.2
idna==2.7
ipython==7.5.0
ipython-genutils==0.2.0
jedi==0.13.3
jmespath==0.9.4
more-itertools==5.0.0
numpy==1.13.3
pandas==0.23.4
parso==0.4.0
pathlib2==2.3.3
pexpect==4.7.0
pickleshare==0.7.5
pluggy==0.9.0
prompt-toolkit==2.0.9
protobuf==3.8.0rc1
ptyprocess==0.6.0
py==1.8.0
py4j==0.10.7
Pygments==2.4.2
pyspark==2.4.3
pyspark-hyperloglog==2.1.1
pytest==4.4.1
pytest-cov==2.7.1
pytest-timeout==1.3.3
python-dateutil==2.8.0
python-moztelemetry==0.10.2
python-snappy==0.5.4
pytz==2019.1
PyYAML==5.1
requests==2.20.1
requests-toolbelt==0.8.0
s3transfer==0.1.13
scandir==1.10.0
scipy==1.0.0rc1
six==1.11.0
toml==0.10.0
tox==3.12.1
traitlets==4.3.2
typing==3.6.4
ujson==1.35
urllib3==1.24.3
virtualenv==16.6.0
wcwidth==0.1.7