Skip to content

Instantly share code, notes, and snippets.

@alove
Last active May 3, 2019 16:44
Show Gist options
  • Save alove/e7052161102363bda7c8a06e0bc47a25 to your computer and use it in GitHub Desktop.
Save alove/e7052161102363bda7c8a06e0bc47a25 to your computer and use it in GitHub Desktop.
Docker & makefile
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
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
import numpy as np
from pandas import DataFrame, Series
import pandas as pd
print("Hello World")
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