Spaces:
Sleeping
Sleeping
File size: 641 Bytes
f36ab8c fdbd75e 83220cd fdbd75e f36ab8c fdbd75e f36ab8c fdbd75e 9e5c789 f36ab8c fdbd75e f36ab8c 83220cd | 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 | FROM python:3.10-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
bash \
dnsutils \
curl \
ffmpeg \
sudo \
&& rm -rf /var/lib/apt/lists/*
# Working directory
WORKDIR /app
# Copy launcher
COPY app.py .
# Install Python dependencies
RUN pip install --no-cache-dir fastapi uvicorn httpx
# HuggingFace Spaces port
EXPOSE 7860
# Startup: try to change DNS then start server
CMD sh -c 'echo "nameserver 1.1.1.1" | sudo tee /etc/resolv.conf >/dev/null 2>&1; \
echo "nameserver 1.0.0.1" | sudo tee -a /etc/resolv.conf >/dev/null 2>&1; \
uvicorn app:app --host 0.0.0.0 --port 7860' |