返回提交历史
Modified
README.md
+1
-0
Modified
docker/Dockerfile
+13
-3
Modified
g4f/Provider/__init__.py
+0
-1
XFEstudio/gpt4free
Fix remove NoowAi, Fix download dir in docker
854dc6c9
代码差异
3 个文件
+14
-4
@@ -155,6 +155,7 @@ cd gpt4free
155
155
4. Build the Docker image:
156
156
157
157
```bash
158
docker pull selenium/node-chrome
158
159
docker-compose build
159
160
```
160
161
@@ -11,8 +11,12 @@ ENV G4F_USER ${G4F_USER:-g4f}
11
11
ARG G4F_USER_ID
12
12
ENV G4F_USER_ID ${G4F_USER_ID:-1000}
13
13
ARG G4F_NO_GUI
14
ENV G4F_NO_GUI ${G4F_NO_GUI}
14
ENV G4F_NO_GUI $G4F_NO_GUI
15
15
ENV HOME /home/$G4F_USER
16
ENV SE_DOWNLOAD_DIR $HOME/Downloads
17
ENV SEL_USER $G4F_USER
18
ENV SEL_UID $G4F_USER_ID
19
ENV SEL_GID $G4F_USER_ID
16
20
17
21
USER root
18
22
@@ -46,9 +50,15 @@ RUN if [ "$G4F_NO_GUI" ] ; then \
46
50
# Change background image
47
51
COPY docker/background.png /usr/share/images/fluxbox/ubuntu-light.png
48
52
49
# Switch user
53
# Add user
50
54
RUN groupadd -g $G4F_USER_ID $G4F_USER
51
55
RUN useradd -rm -G sudo -u $G4F_USER_ID -g $G4F_USER_ID $G4F_USER
56
57
# Fix permissions
58
RUN mkdir "${SE_DOWNLOAD_DIR}"
59
RUN chown "${G4F_USER_ID}:${G4F_USER_ID}" $SE_DOWNLOAD_DIR /var/run/supervisor /var/log/supervisor
60
61
# Switch user
52
62
USER $G4F_USER_ID
53
63
54
64
# Set the working directory in the container.
@@ -61,7 +71,7 @@ COPY requirements.txt $G4F_DIR
61
71
RUN pip install --upgrade pip && pip install -r requirements.txt
62
72
63
73
# Copy the entire package into the container.
64
ADD --chown=$G4F_USER g4f $G4F_DIR/
74
ADD --chown=$G4F_USER:$G4F_USER g4f $G4F_DIR/
65
75
66
76
# Expose ports
67
77
EXPOSE 8080 1337
@@ -39,7 +39,6 @@ from .Koala import Koala
39
39
from .Liaobots import Liaobots
40
40
from .Llama2 import Llama2
41
41
from .MyShell import MyShell
42
from .NoowAi import NoowAi
43
42
from .OnlineGpt import OnlineGpt
44
43
from .Opchatgpts import Opchatgpts
45
44
from .PerplexityAi import PerplexityAi