-
Notifications
You must be signed in to change notification settings - Fork 802
/
Copy pathbuild_whl.dockerfile
55 lines (44 loc) · 1.47 KB
/
build_whl.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
FROM ubuntu:bionic
ENV NODE_VERSION=18.20.7
# install required packages
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
curl \
software-properties-common \
gettext \
git \
git-lfs \
python3.6 \
python-pip \
python-sphinx
# Upgrade pip. Otherwise pip cannot install c extension packages that are not
# for current platform
RUN pip install -U pip
# add yarn ppa
RUN (curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -) && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# install nodejs and yarn
RUN apt-get update && \
curl -sSO https://deb.nodesource.com/node_18.x/pool/main/n/nodejs/nodejs_$NODE_VERSION-1nodesource1_amd64.deb && \
dpkg -i ./nodejs_$NODE_VERSION-1nodesource1_amd64.deb && \
rm nodejs_$NODE_VERSION-1nodesource1_amd64.deb && \
apt-get install yarn
RUN git lfs install &&\
mkdir kolibri &&\
mkdir yarn_cache &&\
mkdir cext_cache
WORKDIR /kolibri
# Python dependencies
COPY requirements/ requirements/
RUN echo '--- Installing Python dependencies' && \
pip install -r requirements/build.txt
# Set yarn cache folder for easy binding during runtime
RUN yarn config set cache-folder /yarn_cache
# Copy all files in this directory
COPY . .
CMD echo '--- Installing JS dependencies' && \
yarn install --pure-lockfile && \
echo '--- Making whl' && \
make dist && \
echo '--- Making pex' && \
make pex