mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-05 18:20:35 -08:00
Refactor Dockerfile and backend API for improved image processing and dependency management
This commit is contained in:
parent
f571237eb7
commit
9b3e7a69d2
4 changed files with 9 additions and 22 deletions
|
|
@ -3,7 +3,6 @@ FROM python:slim-bookworm
|
|||
ARG G4F_VERSION
|
||||
ARG G4F_USER=g4f
|
||||
ARG G4F_USER_ID=1000
|
||||
ARG PYDANTIC_VERSION=1.8.1
|
||||
|
||||
ENV G4F_VERSION $G4F_VERSION
|
||||
ENV G4F_USER $G4F_USER
|
||||
|
|
@ -37,25 +36,9 @@ COPY requirements-min.txt $G4F_DIR
|
|||
COPY requirements-slim.txt $G4F_DIR
|
||||
|
||||
# Upgrade pip for the latest features and install the project's Python dependencies.
|
||||
RUN pip install --no-cache-dir -r requirements-min.txt \
|
||||
&& pip install --no-cache-dir --no-binary setuptools \
|
||||
Cython==0.29.22 \
|
||||
setuptools \
|
||||
# Install PyDantic
|
||||
&& pip install \
|
||||
-vvv \
|
||||
--no-cache-dir \
|
||||
--no-binary :all: \
|
||||
--global-option=build_ext \
|
||||
--global-option=-j8 \
|
||||
pydantic==${PYDANTIC_VERSION}
|
||||
RUN pip install --no-cache-dir -r requirements-min.txt
|
||||
RUN cat requirements-slim.txt | xargs -n 1 timeout 5m pip install --no-cache-dir || true
|
||||
|
||||
# Remove build packages
|
||||
RUN pip uninstall --yes \
|
||||
Cython \
|
||||
setuptools
|
||||
|
||||
USER root
|
||||
|
||||
# Clean up build deps
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue