File size: 1,463 Bytes
4b3a3d6
1de00cc
4b3a3d6
 
 
 
 
 
8e4fb94
f711c43
104f299
8e4fb94
c2b6061
ececdd1
93d1cd0
ececdd1
15b3d8e
 
ececdd1
e81484e
4b3a3d6
 
 
522e548
286113d
60e1d95
286113d
60e1d95
 
4b3a3d6
 
a365e56
3444b9b
4b3a3d6
409ee66
60e1d95
 
5a2fea2
64fb45d
4b3a3d6
 
c2b6061
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
# ベースイメージとして Node.js を使用
FROM node:20.19.0

# 作業ディレクトリを設定
WORKDIR /app

# ホストのファイルをコンテナにコピー
COPY . .
# detection_ja.sh に実行権限を付与
RUN chmod +x ./replace_ja.sh
RUN chmod +x ./upload.sh

RUN apt-get update && apt-get install -y python3 python3-pip
RUN apt-get update && \
    apt-get install -y jq git-lfs zip git rsync && \
    git lfs install
    
RUN ./replace_ja.sh

ARG github_token
# translations ディレクトリを作成し、権限を設定
RUN mkdir -p /app/translations && chmod -R 777 /app/translations
RUN chmod -R 777 /app
RUN npm install --save @babel/runtime
# 依存関係をインストール(競合を無視)   npx npm-check-updates -u && 
RUN npm dedupe
RUN npm install --legacy-peer-deps
RUN npm uninstall babel-runtime
RUN npm install --save @babel/runtime
# OpenSSL の互換オプションを有効化
ENV NODE_OPTIONS="--openssl-legacy-provider"
RUN pip install huggingface_hub --break-system-packages
RUN npm install git+https://huggingface.co/datasets/soiz1/s4s-vm
# コンテナの起動時にサーバーを実行
#CMD /bin/sh -c "python3 upload.py && npm start"
RUN npm ls core-js

CMD /bin/sh -c "./upload.sh && NODE_OPTIONS=\"--max-old-space-size=15360 --openssl-legacy-provider\" WEBPACK_VERBOSE=true BUILD_MODE=dist npm run build && npm start"
#CMD /bin/sh -c "npm start"

# コンテナがリッスンするポート
EXPOSE 3000