- Поменял всё снова на Whisper
- Добавил предзагрузку модели по-умолчанию - Убрал метрики - Добавил скрипты для старта - Для отчаянных Dockerfile для сборки контейнера на 70ГБ
This commit is contained in:
+33
-9
@@ -1,22 +1,46 @@
|
||||
FROM rocm/pytorch:rocm6.4.1_ubuntu22.04_py3.10_pytorch_release_2.6.0
|
||||
# Use ROCm compatible Python image as base
|
||||
FROM rocm/pytorch:rocm6.1_ubuntu22.04_py3.10_pytorch_2.1.2
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Install system dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
ffmpeg \
|
||||
git \
|
||||
curl \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Update pip
|
||||
RUN pip install --upgrade pip
|
||||
|
||||
# Copy requirements first for better caching
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir --default-timeout=100 -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
# Install Python dependencies
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Copy application code
|
||||
COPY app.py .
|
||||
|
||||
# Create directory for models and keys
|
||||
RUN mkdir -p /app/models /app/data
|
||||
|
||||
# Set environment variables
|
||||
ENV PYTHONUNBUFFERED=1
|
||||
ENV MODEL_DOWNLOAD_ROOT=/app/models
|
||||
ENV KEYS_FILE=/app/data/keys.txt
|
||||
ENV HSA_OVERRIDE_GFX_VERSION=10.3.0
|
||||
ENV ROCM_PATH=/opt/rocm
|
||||
|
||||
# Expose port
|
||||
EXPOSE 9854
|
||||
|
||||
# Устанавливаем переменные окружения для ROCm
|
||||
ENV HSA_OVERRIDE_GFX_VERSION=10.3.0
|
||||
ENV PYTORCH_ROCM_ARCH=gfx1030
|
||||
# Health check
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
||||
CMD curl -f http://localhost:9854/health || exit 1
|
||||
|
||||
# Run the application
|
||||
CMD ["python", "app.py"]
|
||||
|
||||
# Команда для запуска приложения
|
||||
CMD ["python3", "app.py"]
|
||||
|
||||
Reference in New Issue
Block a user