Testapi / Dockerfile
bahi-bh's picture
Create Dockerfile
ef2ee4c verified
raw
history blame contribute delete
723 Bytes
FROM python:3.10-slim
WORKDIR /app
COPY . /app
RUN apt-get update && apt-get install -y \
git \
curl \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade pip
RUN pip install --no-cache-dir \
"g4f[all]" \
fastapi \
uvicorn \
curl_cffi \
nest_asyncio \
python-multipart
# تحديث providers فقط بدون كسر المكتبة
RUN git clone https://github.com/maruf009sultan/g4f-working /tmp/g4f-working && \
find /tmp/g4f-working -name "*.py" -path "*Provider*" -exec cp {} /usr/local/lib/python3.10/site-packages/g4f/Provider/ \; && \
rm -rf /tmp/g4f-working
EXPOSE 7860
CMD ["python", "-m", "g4f.cli", "gui", "--host", "0.0.0.0", "--port", "7860"]