File size: 777 Bytes
caaaf98 59cbd73 caaaf98 59cbd73 a90d980 caaaf98 8f8a57e 10c4829 5fd7bc0 caaaf98 | 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 | FROM python:3.10-slim
WORKDIR /app
# システムの依存関係をインストール
RUN apt-get update && apt-get install -y \
libgl1 \
libglib2.0-0 \
libgomp1 \
libsm6 \
libxext6 \
patchelf \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt && \
patchelf --clear-execstack /usr/local/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.cpython-310-x86_64-linux-gnu.so && \
find /usr/local/lib/python3.10/site-packages/tokenizers -name "*.so" -exec patchelf --clear-execstack {} +
COPY . .
# Hugging Face Spaces用のポート
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|