-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
62 lines (57 loc) · 2.67 KB
/
Dockerfile
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
59
60
61
62
FROM tiangolo/uwsgi-nginx-flask:python3.6-alpine3.7
MAINTAINER Haoyan Huo <[email protected]>
COPY ./ /app
RUN apk update
RUN apk add libstdc++ libgcc libffi openblas
# When building wheels, add this
# RUN apk add --no-cache --virtual .build-deps \
# make automake gcc g++ python3-dev linux-headers \
# openblas-dev libffi-dev
RUN pip install --upgrade pip
RUN pip install cython
RUN pip install \
/app/wheels/bcrypt-3.1.7-cp36-cp36m-linux_x86_64.whl\
/app/wheels/blis-0.4.1-cp36-cp36m-linux_x86_64.whl\
/app/wheels/cffi-1.14.0-cp36-cp36m-linux_x86_64.whl\
/app/wheels/cymem-2.0.3-cp36-cp36m-linux_x86_64.whl\
/app/wheels/httptools-0.1.1-cp36-cp36m-linux_x86_64.whl\
/app/wheels/MarkupSafe-1.1.1-cp36-none-any.whl\
/app/wheels/murmurhash-1.0.2-cp36-cp36m-linux_x86_64.whl\
/app/wheels/numpy-1.18.2-cp36-cp36m-linux_x86_64.whl\
/app/wheels/peewee-3.13.2-cp36-none-any.whl\
/app/wheels/preshed-3.0.2-cp36-cp36m-linux_x86_64.whl\
/app/wheels/psutil-5.7.0-cp36-cp36m-linux_x86_64.whl\
/app/wheels/pymongo-3.10.1-cp36-cp36m-linux_x86_64.whl\
/app/wheels/spacy-2.2.4-cp36-cp36m-linux_x86_64.whl\
/app/wheels/srsly-1.0.2-cp36-cp36m-linux_x86_64.whl\
/app/wheels/starlette-0.12.9-cp36-none-any.whl\
/app/wheels/thinc-7.4.0-cp36-cp36m-linux_x86_64.whl\
/app/wheels/toolz-0.10.0-cp36-none-any.whl\
/app/wheels/uvloop-0.14.0-cp36-cp36m-linux_x86_64.whl\
/app/wheels/websockets-8.1-cp36-cp36m-linux_x86_64.whl\
/app/prodigy-1.9.9-cp36.cp37.cp38-cp36m.cp37m.cp38-linux_x86_64.whl\
/app/additional_wheels/editdistance-0.5.3-cp36-cp36m-linux_x86_64.whl\
/app/additional_wheels/mrakun-0.38-py3-none-any.whl\
/app/additional_wheels/nltk-3.5-py3-none-any.whl\
/app/additional_wheels/pandas-1.0.3-cp36-cp36m-linux_x86_64.whl\
/app/additional_wheels/py3plex-0.72-py3-none-any.whl\
/app/additional_wheels/regex-2020.4.4-cp36-cp36m-linux_x86_64.whl\
/app/additional_wheels/scipy-1.3.3-cp36-cp36m-linux_x86_64.whl
# For some reason, apline 3.7 can only support scipy 1.3.3
# RUN pip install scipy==1.3.3
RUN pip install -r /app/requirements.txt
# Cleanup
# RUN apk del .build-deps
RUN rm -rf /root/.cache/pip \
/app/prodigy-1.9.9-cp36.cp37.cp38-cp36m.cp37m.cp38-linux_x86_64.whl \
/app/wheels\
/app/additional_wheels
RUN python -m spacy download en_core_web_sm
# NERSC Spin specific
# Make /var/cache/nginx/ writable by non-root users
RUN mkdir /app/run
RUN mkdir /app/run/prodigy_dir /app/run/temp_file_storage
RUN chgrp nginx /var/cache/nginx/ /app/run/prodigy_dir /app/run/temp_file_storage
RUN chmod g+w /var/cache/nginx/ /app/run/prodigy_dir /app/run/temp_file_storage
# Open port 8080 as non-root user
ENV LISTEN_PORT=8080