mr_chatterbox / Dockerfile
tventurella's picture
Upload 17 files
59856b4 verified
raw
history blame contribute delete
871 Bytes
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
RUN pip install --no-cache-dir \
torch --index-url https://download.pytorch.org/whl/cpu
RUN pip install --no-cache-dir \
tokenizers \
fastapi \
uvicorn[standard] \
pydantic \
httpx \
filelock \
huggingface_hub
# Copy application code
COPY nanochat/ nanochat/
COPY scripts/ scripts/
COPY tokenizer_wrapper.py .
COPY tokenizer.json .
COPY start.sh .
RUN chmod +x start.sh
# Create model directory
RUN mkdir -p /app/nanochat_cache/chatsft_checkpoints/d18
# Set environment variables
ENV NANOCHAT_BASE_DIR=/app/nanochat_cache
ENV PYTHONPATH=/app
# HuggingFace Spaces expects port 7860
EXPOSE 7860
CMD ["./start.sh"]