forked from common-voice/common-voice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (25 loc) · 999 Bytes
/
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
FROM node:18-bullseye
RUN apt-get update && \
apt-get install python3-pip vim -y && \
pip3 install --upgrade setuptools
RUN groupmod -g 10001 node && usermod -u 10001 -g 10001 node
RUN mkdir /cache && chmod 777 /cache
USER node
RUN mkdir -p /home/node/code
WORKDIR /home/node
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN git clone --depth 1 -b release-v1.0.0 https://github.com/common-voice/mp3-duration-reporter.git
RUN cd mp3-duration-reporter && /home/node/.cargo/bin/cargo install --path .
RUN git clone --depth 1 -b release-v1.2.1 https://github.com/common-voice/CorporaCreator.git
RUN pip3 install numpy
RUN cd CorporaCreator && python3 setup.py install --user
ENV PATH "$PATH:/home/node/.local/bin/:/home/node/.cargo/bin"
ENV npm_config_cache "/home/node/"
WORKDIR /home/node/code
COPY --chown=node ./package.json ./
COPY --chown=node ./package-lock.json ./
# Install dependencies
RUN npm ci
COPY --chown=node ./ ./
RUN npm run build
CMD ["npm", "run", "start"]