Dockerfile 426 B

1234567891011121314151617181920
  1. FROM python:3.9
  2. ARG G4F_IGNORED_PROVIDERS
  3. RUN useradd -m -u 1000 user
  4. WORKDIR /app
  5. COPY --chown=user ./requirements.txt requirements.txt
  6. RUN pip install --no-cache-dir --upgrade -r requirements.txt
  7. COPY --chown=user . /app
  8. USER user
  9. ENV HOME=/home/user \
  10. PATH=/home/user/.local/bin:$PATH
  11. ENV G4F_IGNORED_PROVIDERS $G4F_IGNORED_PROVIDERS
  12. CMD python -m g4f --port 7860 --debug --ignored-providers $G4F_IGNORED_PROVIDERS