forked from lithops-cloud/lithops
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.conda
More file actions
58 lines (47 loc) · 2.17 KB
/
Dockerfile.conda
File metadata and controls
58 lines (47 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Python 3.6
#FROM continuumio/miniconda3:4.5.4
# Python 3.7
#FROM continuumio/miniconda3:4.7.12
# Python 3.8
FROM continuumio/miniconda3:4.9.2
# Python 3.9
#FROM continuumio/miniconda3:4.10.3
# YOU MUST PIN THE PYTHON VERSION TO PREVENT IT TO BE UPDATED
# For python 3.6 use "python==3.6.5"
# For python 3.7 use "python==3.7.4"
# For python 3.8 use "python==3.8.5"
# For python 3.9 use "python==3.9.5"
RUN echo "python==3.8.5" >> /opt/conda/conda-meta/pinned
ENV FLASK_PROXY_PORT 8080
RUN apt-get --allow-releaseinfo-change update \
# Upgrade installed packages to get latest security fixes if the base image does not contain them already.
&& apt-get upgrade -y --no-install-recommends \
# add some packages required for the pip install
&& apt-get install -y --no-install-recommends \
gcc \
libc-dev \
libxslt-dev \
libxml2-dev \
libffi-dev \
libssl-dev \
zip \
unzip \
vim \
make \
# cleanup package lists, they are not used anymore in this image
&& rm -rf /var/lib/apt/lists/* \
&& apt-cache search linux-headers-generic
# Add your Conda required packages here. Ensure "conda clean --all" at
# the end to remove temporary data. One "RUN" line is better than multiple
# ones in terms of image size. For example:
#RUN conda update -n base conda && conda install -c conda-forge opencv && conda install sortedcontainers gevent-websocket && conda clean --all
# install additional python modules
COPY requirements.txt requirements.txt
RUN pip install --upgrade pip setuptools six && pip install --no-cache-dir -r requirements.txt
# create action working directory
RUN mkdir -p /action \
&& mkdir -p /actionProxy \
&& mkdir -p /pythonAction
ADD https://raw.githubusercontent.com/apache/openwhisk-runtime-docker/8b2e205c39d84ed5ede6b1b08cccf314a2b13105/core/actionProxy/actionproxy.py /actionProxy/actionproxy.py
ADD https://raw.githubusercontent.com/apache/openwhisk-runtime-python/3%401.0.3/core/pythonAction/pythonrunner.py /pythonAction/pythonrunner.py
CMD ["/bin/bash", "-c", "cd /pythonAction && python -u pythonrunner.py"]