-
Notifications
You must be signed in to change notification settings - Fork 29
/
Dockerfile
48 lines (39 loc) · 890 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
40
41
42
43
44
45
46
47
48
#
# @author Loreto Parisi (loretoparisi at gmail dot com)
# v1.0.0
#
# Copyright (c) 2017-2023 Loreto Parisi - https://github.com/loretoparisi/docker
#
FROM ubuntu:16.04
LABEL authors="Loreto Parisi <[email protected]>"
# working directory
ENV HOME /root
ENV NODE_VERSION 14.17.3
WORKDIR $HOME
# packages list
RUN \
apt-get update && apt-get install -y \
autoconf \
automake \
curl \
git \
npm
# node.js
RUN npm install n -g
RUN n $NODE_VERSION
RUN npm update
# build native fasttext
RUN \
git clone https://github.com/facebookresearch/fastText.git && \
cd fastText && \
make
# build fasttext.js
RUN \
git clone --depth=1 https://github.com/loretoparisi/fasttext.js && \
cd fasttext.js && \
npm install
# copy binaries
RUN cp fastText/fasttext fasttext.js/lib/bin/linux/
# run train
RUN node fasttext.js/examples/train.js
CMD ["bash"]