techfreakworm's picture
chore(deploy): one-click launchers and HF Spaces Dockerfile
f063646 unverified
raw
history blame contribute delete
609 Bytes
# syntax=docker/dockerfile:1.6
FROM node:20-alpine AS web
WORKDIR /web
COPY web/package*.json ./
RUN npm ci --no-audit --no-fund
COPY web/ ./
RUN npm run build
FROM python:3.11-slim
ENV HF_HOME=/tmp/hf \
PYTHONUNBUFFERED=1 \
PORT=7860
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends libsndfile1 ffmpeg \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY server/ server/
COPY --from=web /web/dist server/static/
EXPOSE 7860
CMD ["uvicorn", "server.main:app", "--host", "0.0.0.0", "--port", "7860"]