# ベースイメージとしてPython 3.11.7を使用 FROM python:3.11.7-slim # 作業ディレクトリを設定 WORKDIR /code # requirements.txtをコンテナにコピー COPY ./requirements.txt /code/requirements.txt run export HF_HOME=/code/GloSoc-Tec-prj1-EnLearn/hf_cache run export HF_DATASETS_CACHE=/code/GloSoc-Tec-prj1-EnLearn/hf_datasets_cache run export TRANSFORMERS_CACHE=/code/GloSoc-Tec-prj1-EnLearn/hf_transformers_cache # 依存関係をインストール RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt # git をインストール RUN apt-get update && apt-get install -y git # シークレット情報をクローンに使用 RUN git clone https://github.com/OzoneAsai/GloSoc-Tec-prj1-EnLearn.git run mkdir /nltk_data run chmod -R 777 /nltk_data # ソースコード全体をコンテナにコピー COPY . . RUN chmod -R 777 ./GloSoc-Tec-prj1-EnLearn RUN cd ./GloSoc-Tec-prj1-EnLearn WORKDIR /code/GloSoc-Tec-prj1-EnLearn RUN mkdir /code/GloSoc-Tec-prj1-EnLearn/nltk RUN export NLTK_DATA=/code/GloSoc-Tec-prj1-EnLearn/nltk RUN chmod -R 777 /code/ # アプリケーションの起動 CMD ["python3", "app.py"]