Skip to content

Commit

Permalink
Merge 2ffa5ed into e981324
Browse files Browse the repository at this point in the history
  • Loading branch information
willgraf committed Apr 2, 2021
2 parents e981324 + 2ffa5ed commit 0813094
Show file tree
Hide file tree
Showing 82 changed files with 517 additions and 7,210 deletions.
File renamed without changes.
11 changes: 11 additions & 0 deletions .ebextensions/options.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
option_settings:

aws:elasticbeanstalk:application:environment:
FLASK_APP: application
FLASK_ENV: production

aws:elasticbeanstalk:container:python:
WSGIPath: application.py

aws:elasticbeanstalk:container:python:staticfiles:
/static/: deepcell_label/static/
File renamed without changes.
File renamed without changes.
118 changes: 118 additions & 0 deletions .ebignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
.git

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Flask Monitoring Dashboard
flask_monitoringdashboard.db

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
env/
venv/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# JavaScript Dependencies
node_modules/
2 changes: 2 additions & 0 deletions browser/.env.example → .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Flask settings
FLASK_APP=application
FLASK_ENV=development
DEBUG=
TEMPLATES_AUTO_RELOAD=

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,24 @@ jobs:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('browser/requirements.txt') }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r browser/requirements.txt
pip install -r browser/requirements-test.txt
pip install -r requirements.txt
pip install -r requirements-test.txt
- name: Run PyTest and Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true
run: |
pytest browser --cov browser --pep8
pytest deepcell_label --cov deepcell_label --pep8
coveralls
coveralls:
Expand Down
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Elastic Beanstalk Files
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -69,6 +74,10 @@ db.sqlite3
instance/
.webassets-cache

# Flask monitoring dashboard stuff:
flask_monitoringdashboard.db
fmd_config.cfg

# Scrapy stuff:
.scrapy

Expand Down Expand Up @@ -112,4 +121,13 @@ venv.bak/
# mypy
.mypy_cache/

node_modules
# VS Code
.vscode

# JavaScript Dependencies
node_modules/
package-lock.json
yarn.lock

# Webpack builds javascript files into deepcell_label/static
deepcell_label/static/js/*
30 changes: 6 additions & 24 deletions Dockerfile
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,31 +1,13 @@
FROM ubuntu:16.04

# System maintenance
RUN apt-get update && apt-get install -y \
python3-tk \
python3-dev \
python3-pip \
mesa-utils \
xorg-dev \
libglu1-mesa libgl1-mesa-dev \
x11vnc \
xvfb \
fluxbox \
wmctrl \
libsm6 && \
rm -rf /var/lib/apt/lists/* && \
pip3 install --upgrade pip
FROM python:3.7

WORKDIR /usr/src/app

# Copy the requirements.txt and install the dependencies
COPY setup.py requirements.txt ./
RUN pip3 install -r requirements.txt
COPY requirements.txt requirements.txt

RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the package code and its scripts
COPY . .

# Install via setup.py
RUN pip3 install .
EXPOSE 5000

CMD "bin/entrypoint.sh"
CMD ["/bin/sh", "-c", "python application.py"]

0 comments on commit 0813094

Please sign in to comment.