Spaces:
Runtime error
Runtime error
File size: 1,332 Bytes
4b3a3d6 1de00cc 4b3a3d6 8e4fb94 f711c43 104f299 8e4fb94 c2b6061 ececdd1 93d1cd0 ececdd1 15b3d8e 47b0bce ececdd1 e81484e 4b3a3d6 be06748 286113d 366d4e2 4b3a3d6 a365e56 3444b9b 9bb88bc 4b3a3d6 409ee66 109464c 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 |
# ベースイメージとして 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
ENV WEBPACK_VERBOSE=true npm run build
ARG github_token
# translations ディレクトリを作成し、権限を設定
RUN mkdir -p /app/translations && chmod -R 777 /app/translations
RUN chmod -R 777 /app
RUN node --max-old-space-size=4096 node_modules/.bin/webpack
# 依存関係をインストール(競合を無視) npx npm-check-updates -u &&
RUN npm install --legacy-peer-deps
# 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"
CMD /bin/sh -c "./upload.sh && BUILD_MODE=dist npm run build && npm start"
#CMD /bin/sh -c "npm start"
# コンテナがリッスンするポート
EXPOSE 3000 |