Skip to content

Commit

Permalink
[#375] Freeze Python packages in base-python-image using pipenv (#393)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillmakhonin authored and allesh-clmb committed Oct 31, 2018
1 parent c3f0b15 commit 7b59436
Show file tree
Hide file tree
Showing 7 changed files with 1,156 additions and 37 deletions.
9 changes: 5 additions & 4 deletions base-python-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ENV DEBIAN_FRONTEND=noninteractive

# Add Python3.6 repository
RUN apt-get update && apt-get install -y software-properties-common && \
add-apt-repository -y ppa:deadsnakes/ppa
add-apt-repository -y ppa:deadsnakes/ppa

RUN apt-get update && apt-get install -y --no-install-recommends python3.6 \
g++ apt-utils build-essential python3.6-dev python3-pip python3-setuptools libpython3.6-dev \
Expand All @@ -37,10 +37,11 @@ ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8

RUN ln -sf /usr/bin/python3.6 /usr/bin/python3
RUN pip3 install --disable-pip-version-check --upgrade pip==9.0.3 pipenv==2018.10.13

COPY requirements.txt /root/requirements.txt
COPY Pipfile Pipfile
COPY Pipfile.lock Pipfile.lock

RUN pip3 install --disable-pip-version-check --upgrade pip==9.0.3 numpy==1.14.3
RUN pip3 install --disable-pip-version-check --no-cache-dir -r /root/requirements.txt
RUN pipenv install --system --deploy --python python3.6

WORKDIR /app
41 changes: 41 additions & 0 deletions base-python-image/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[[source]]
url = "https://pypi.org/simple"
name = "pypi"
verify_ssl = true

[requires]
python_version = "3.6"

[dev-packages]

[packages]
nose = "==1.3.7"
pydot-ng = "==1.0.0"
cython = "==0.28.1"
requests = "==2.18.4"
dill = "==0.2.7.1"
python-interface = "==1.4.0"
pandas = "==0.23.0"
"unittest2" = "==1.1.0"
flask = "==0.12.4"
docker = "==3.1.3"
ipykernel = "==4.9.0"
jupyter = "==1.0.0"
"urllib3" = "==1.22"
sklearn = "==0.0"
pydevd = "==1.1.1"
matplotlib = "==2.2.2"
pillow = "==5.0.0"
statsd = "==3.2.2"
locustio = "==0.8.1"
uwsgi = "==2.0.17"
aiohttp = "==2.3.10"
numpy = "==1.14.3"
scipy = "==1.0.0"
cchardet = "==2.1.1"
aiohttp-wsgi = "==0.7.1"
pyyaml = "==3.12"
kubernetes = "==6.0.0"
aionotify = "==0.2.0"
docker-registry-client = "==0.5.2"
surprise = "==0.1"
1,107 changes: 1,107 additions & 0 deletions base-python-image/Pipfile.lock

Large diffs are not rendered by default.

30 changes: 0 additions & 30 deletions base-python-image/requirements.txt

This file was deleted.

2 changes: 1 addition & 1 deletion legion/legion/k8s/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ def delete(self, grace_period_seconds=0):
grace_period_seconds=grace_period_seconds)

LOGGER.info('Deleting service {} in namespace {}'.format(self.k8s_service.metadata.name, self.namespace))
core_v1api.delete_namespaced_service(name=self.k8s_service.metadata.name,
core_v1api.delete_namespaced_service(name=self.k8s_service.metadata.name, body=body,
namespace=self.namespace)

LOGGER.info('Deleting deployment {} in namespace {} with grace period {}s'
Expand Down
2 changes: 1 addition & 1 deletion legion/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Pillow==5.0.0
Jinja2==2.10
statsd==3.2.2
requests==2.18.4
kubernetes==5.0.0
kubernetes==6.0.0
PyYAML==3.12
aionotify==0.2.0
docker-registry-client==0.5.2
Expand Down
2 changes: 1 addition & 1 deletion legion_test/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ robotframework-seleniumlibrary==3.1.1
robotframework-pabot==0.44
requests==2.9.1
PyYAML==3.12
kubernetes==5.0.0
kubernetes==6.0.0
aionotify==0.2.0
pyopenssl==18.0.0

0 comments on commit 7b59436

Please sign in to comment.