Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
Permalink
Browse files

Adding sample predict functions as python files

  • Loading branch information
yadudoc committed Mar 28, 2018
1 parent f2bba75 commit 48928edc7b37a7b08f233a8b901664cd32e54b8f
Showing with 32 additions and 0 deletions.
  1. +12 −0 docker/app1/Dockerfile
  2. +4 −0 docker/app1/app1.py
  3. +12 −0 docker/app2/Dockerfile
  4. +4 −0 docker/app2/app2.py
@@ -0,0 +1,12 @@
# Use an official Python runtime as a parent image
FROM python:3.6

# Set the working directory to /home
WORKDIR /home

# Copy the current directory contents into the container at /app
ADD ./app1.py /home/


# Install any needed packages specified in requirements.txt
RUN pip3 install parsl
@@ -0,0 +1,4 @@

def predict(list_items):
"""Returns the double of the items"""
return [i*2 for i in list_items]
@@ -0,0 +1,12 @@
# Use an official Python runtime as a parent image
FROM python:3.6

# Set the working directory to /home
WORKDIR /home

# Copy the current directory contents into the container at /app
ADD ./app2.py /home/


# Install any needed packages specified in requirements.txt
RUN pip3 install parsl
@@ -0,0 +1,4 @@

def predict(list_items):
"""Returns items+10"""
return [i+10 for i in list_items]

0 comments on commit 48928ed

Please sign in to comment.
You can’t perform that action at this time.