IR_PR_PilotPro / Dockerfile
Corin1998's picture
Update Dockerfile
66c066f verified
raw
history blame contribute delete
735 Bytes
FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1 \
HF_HUB_DISABLE_SYMLINKS_WARNING=1 \
HF_HOME=/tmp/hf-cache \
TRANSFORMERS_CACHE=/tmp/hf-cache \
SENTENCE_TRANSFORMERS_HOME=/tmp/hf-cache \
TORCH_HOME=/tmp/hf-cache
RUN apt-get update && apt-get install -y \
build-essential wget git libglib2.0-0 libgl1 && \
rm -rf /var/lib/apt/lists/*
WORKDIR /code
ENV PYTHONPATH=/code
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . /code
# 書き込み可能に
RUN mkdir -p /code/data /tmp/hf-cache && chmod -R 777 /code/data /tmp/hf-cache
EXPOSE 7860
# ★ run.pyは使わず、起動ターゲットを固定
CMD ["uvicorn", "irpr.main:app", "--host", "0.0.0.0", "--port", "7860"]