Last active
May 3, 2019 16:44
-
-
Save alove/e7052161102363bda7c8a06e0bc47a25 to your computer and use it in GitHub Desktop.
Docker & makefile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.7.3-alpine3.9 | |
RUN apk add build-base | |
RUN apk update && apk add postgresql-dev gcc python3-dev musl-dev | |
COPY requirements.txt /myapp/requirements.txt | |
COPY Makefile /myapp/Makefile | |
RUN python3 -m pip install virtualenv | |
RUN cd myapp && make venv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
venv: | |
if [ -d .py ] ; \ | |
then \ | |
echo "virtualenv already built, skipping..."; \ | |
else \ | |
python3 -m venv .py; \ | |
.py/bin/python3 -m pip install -r requirements.txt; \ | |
fi | |
myapp_run: venv | |
.py/bin/python3 myapp.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from pandas import DataFrame, Series | |
import pandas as pd | |
print("Hello World") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python-dateutil==2.7.5 | |
numpy | |
pandas==0.23.4 | |
psycopg2==2.7.6.1 | |
urllib3==1.24.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment