Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM continuumio/miniconda3:latest

WORKDIR /app

# Install myapp requirements
COPY environment.yml /app/environment.yml
RUN conda config --add channels conda-forge \
&& conda env create -n myapp -f environment.yml \
&& rm -rf /opt/conda/pkgs/*

# Copy all files after to avoid rebuild the conda env each time
COPY . /app/

# activate the myapp environment
ENV PATH /opt/conda/envs/myapp/bin:$PATH

# Launch the API
CMD ["bash", "-c", "source activate flask_env"]

RUN pip install -r requirements.txt

RUN conda install nomkl

EXPOSE 5000

CMD ["bash", "-c", "python web.py"]

15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3.0'

services:

rs_system:
depends_on:
- redis_db
image: prageethatdocker/groveco_content_engine:1.0
ports:
- "5000:5000"
restart: always

redis_db:
image: redis
command: [sh, -c, "rm -f /data/dump.rdb && redis-server --save ''"]
6 changes: 6 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: myapp
channels:
- conda-forge
- defaults
dependencies:
- python=2.7
13 changes: 12 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
Flask-API==0.6.2
gunicorn==19.5.0
gunicorn==19.1.1
wsgiref==0.1.2
flask==0.10.1
jinja2==2.8
numpy==1.11.0
pandas==0.18.1
redis==2.6.2
requests==2.10.0
scikit-learn==0.17.1
setuptools==20.7.0
six==1.9.0
wheel==0.29.0
scipy