Team Ai
Apppublic

Synthraptor/Application-Programming-Interface

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
Dockerfile40 linesDownload Raw Back to root
1# Use official Python image (with latest Python 3.10+)2FROM python:3.10-slim3 4# Prevent Python from writing .pyc files and set unbuffered mode5ENV PYTHONDONTWRITEBYTECODE=16ENV PYTHONUNBUFFERED=17 8# Install system dependencies: ffmpeg for audio (Pydub), Chrome for some providers, and build tools9RUN apt-get update && \10    apt-get install -y --no-install-recommends \11        ffmpeg \12        wget \13        gnupg2 \14        curl \15        ca-certificates \16    && wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \17    && echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \18    && apt-get update \19    && apt-get install -y --no-install-recommends google-chrome-stable \20    && rm -rf /var/lib/apt/lists/*21 22# Set work directory23WORKDIR /app24 25# Create har_and_cookies directory with open permissions26RUN mkdir -p /app/har_and_cookies && chmod 777 /app/har_and_cookies27 28# Copy all app files (if you have extra files/configs)29COPY . .30 31# Install g4f (GPT4Free) with all providers32RUN pip install --upgrade pip && \33    pip install -U g4f[all]34 35# Expose the API port36EXPOSE 133737 38# Start the g4f FastAPI server on port 133739CMD ["python", "-m", "g4f.api.run", "--bind" "7860"]40