File size: 1,071 Bytes
f8a30b1
 
 
 
 
 
 
 
 
 
 
 
6cfc964
f8a30b1
 
 
 
 
 
 
 
 
 
 
 
 
5c3dc4c
 
f8a30b1
 
 
 
 
 
 
 
 
 
 
 
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# ============================================================
# Minecraft Texture Generator MCP Server
# ============================================================
# Generates 16×16 pixel Minecraft-style textures using
# Stable Diffusion (sdxl-turbo). Generates at 256×256 with
# pixel art prompting, then downscales to 16×16 with
# nearest-neighbor + color quantization.
# ============================================================

FROM python:3.11-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
    libgl1 \
    libglib2.0-0 \
    && rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache-dir \
    torch torchvision --index-url https://download.pytorch.org/whl/cpu

RUN pip install --no-cache-dir \
    diffusers>=0.32.0 \
    transformers>=4.46.0 \
    accelerate>=1.1.0 \
    safetensors \
    Pillow>=10.0.0 \
    mcp[cli]>=1.27.0 \
    uvicorn>=0.30.0 \
    gradio>=4.0.0

RUN useradd -m -u 1000 appuser

WORKDIR /app
COPY server.py .

EXPOSE 7860

ENV MODEL_ID=stabilityai/sdxl-turbo
ENV PORT=7860

CMD ["python", "server.py"]