Spaces:
Sleeping
Sleeping
File size: 631 Bytes
6569132 | 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 | FROM python:3.11-slim
WORKDIR /app
# Install dependencies
COPY pyproject.toml .
RUN pip install --no-cache-dir \
fastapi \
uvicorn \
pydantic \
numpy \
"openenv-core==0.2.1" \
"transformers>=4.40.0" \
"torch>=2.2.0" \
"accelerate>=0.30.0" \
"sentencepiece>=0.2.0" \
"safetensors>=0.4.0"
# Copy source
COPY server/ server/
COPY viz_standalone.html .
# HF Spaces injects PORT at runtime (default 7860)
ENV PORT=7860
ENV DIFFICULTY=easy
EXPOSE 7860
# Use PORT from environment so the Space can bind correctly
CMD ["sh", "-c", "uvicorn server.app:app --host 0.0.0.0 --port ${PORT:-7860}"]
|