Shackless commited on
Commit
2b9b4ca
·
1 Parent(s): 9e859ed

use CPU-only pytorch to shrink bundle size

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -1
  2. requirements.txt +3 -0
Dockerfile CHANGED
@@ -1,5 +1,6 @@
1
  # Dockerfile for PocketTTS OpenAI-Compatible Server
2
  # Optimized for CPU inference (pocket-tts runs efficiently on CPU)
 
3
 
4
  FROM python:3.10-slim AS builder
5
 
@@ -12,7 +13,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
12
  RUN python -m venv /opt/venv
13
  ENV PATH="/opt/venv/bin:$PATH"
14
 
15
- # Install Python dependencies
16
  COPY requirements.txt /tmp/requirements.txt
17
  RUN pip install --no-cache-dir --upgrade pip && \
18
  pip install --no-cache-dir -r /tmp/requirements.txt
 
1
  # Dockerfile for PocketTTS OpenAI-Compatible Server
2
  # Optimized for CPU inference (pocket-tts runs efficiently on CPU)
3
+ # Uses CPU-only PyTorch for smaller image size (~700MB vs ~2GB)
4
 
5
  FROM python:3.10-slim AS builder
6
 
 
13
  RUN python -m venv /opt/venv
14
  ENV PATH="/opt/venv/bin:$PATH"
15
 
16
+ # Install Python dependencies (requirements.txt specifies CPU-only PyTorch)
17
  COPY requirements.txt /tmp/requirements.txt
18
  RUN pip install --no-cache-dir --upgrade pip && \
19
  pip install --no-cache-dir -r /tmp/requirements.txt
requirements.txt CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  # Core dependencies
2
  flask>=3.0.0
3
  waitress>=3.0.0
 
1
+ # CPU-only PyTorch (smaller, faster install - this project is CPU-only)
2
+ --extra-index-url https://download.pytorch.org/whl/cpu
3
+
4
  # Core dependencies
5
  flask>=3.0.0
6
  waitress>=3.0.0