XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

Arm2 (#2415)

* Fix arm v7 build / improve api * Update stubs.py * Fix unit tests * Fix arm build

7d9a6401
H Lohaus <hlohaus@users.noreply.github.com>
提交于

代码差异

2 个文件 +10 -10
Modified README.md +6 -6
@@ -105,23 +105,23 @@ docker run \
105 105 hlohaus789/g4f:latest
106 106 ```
107 107
108 Start the GUI without a browser requirement and in debug mode.
109 There's no need to update the Docker image every time.
110 Simply remove the g4f package from the image and install the Python package:
108 To run the slim docker image. Use this command:
109
111 110 ```bash
112 111 docker run \
113 -p 8080:8080 \
112 -p 1337:1337 \
114 113 -v ${PWD}/har_and_cookies:/app/har_and_cookies \
115 114 -v ${PWD}/generated_images:/app/generated_images \
116 115 hlohaus789/g4f:latest-slim \
117 116 rm -r -f /app/g4f/ \
118 117 && pip install -U g4f[slim] \
119 && python -m g4f.cli gui -d
118 && python -m g4f.cli api --gui --debug
120 119 ```
120 It also updates the `g4f` package at startup and installs any new required dependencies.
121 121
122 122 3. **Access the Client:**
123 123
124 - To use the included client, navigate to: [http://localhost:8080/chat/](http://localhost:8080/chat/)
124 - To use the included client, navigate to: [http://localhost:8080/chat/](http://localhost:8080/chat/) or [http://localhost:1337/chat/](http://localhost:1337/chat/)
125 125 - Or set the API base for your client to: [http://localhost:1337/v1](http://localhost:1337/v1)
126 126
127 127 4. **(Optional) Provider Login:**
Modified docker/Dockerfile-slim +4 -4
@@ -19,7 +19,8 @@ RUN apt-get update && apt-get upgrade -y \
19 19 && useradd -rm -G sudo -u $G4F_USER_ID -g $G4F_USER_ID $G4F_USER \
20 20 && mkdir -p /var/log/supervisor \
21 21 && chown "${G4F_USER_ID}:${G4F_USER_ID}" /var/log/supervisor \
22 && echo "${G4F_USER}:${G4F_USER}" | chpasswd
22 && echo "${G4F_USER}:${G4F_USER}" | chpasswd \
23 && python -m pip install --upgrade pip
23 24
24 25 USER $G4F_USER_ID
25 26 WORKDIR $G4F_DIR
@@ -35,15 +36,14 @@ COPY requirements-slim.txt $G4F_DIR
35 36 RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
36 37
37 38 # Upgrade pip for the latest features and install the project's Python dependencies.
38 RUN python -m pip install --upgrade pip \
39 && pip install --no-cache-dir \
39 RUN pip install --no-cache-dir \
40 40 Cython==0.29.22 \
41 41 setuptools \
42 42 # Install PyDantic
43 43 && pip install \
44 44 -vvv \
45 45 --no-cache-dir \
46 --no-binary pydantic \
46 --no-binary :all: \
47 47 --global-option=build_ext \
48 48 --global-option=-j8 \
49 49 pydantic==${PYDANTIC_VERSION} \