J-Moshi-Arena / Dockerfile
yutoAb
Add application file
4ee8d5c
FROM python:3.11-slim
WORKDIR /app
# Triton/Inductor の JIT に必要(gcc等)
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy application files
COPY requirements.txt .
COPY app.py .
RUN pip install --no-cache-dir uv
RUN uv pip install --system --no-cache-dir -r requirements.txt
# 安定化
ENV OMP_NUM_THREADS=1
ENV MKL_NUM_THREADS=1
ENV PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
# ✅ ログが止まって見える問題を解消
ENV PYTHONUNBUFFERED=1
# ✅ 起動を軽くする(コンパイル無効)
ENV TORCHDYNAMO_DISABLE=1
ENV TORCHINDUCTOR_DISABLE=1
ENV GRADIO_SERVER_NAME=0.0.0.0
ENV GRADIO_SERVER_PORT=7860
# Expose ports for:
# - 7860: Main Gradio interface
# - 8998: Moshi server 1 (finetuned-step-9282)
# - 8999: Moshi server 2 (j-moshi)
EXPOSE 7860 8998 8999
CMD ["python", "app.py"]