roxky commited on
Commit
2554968
·
verified ·
1 Parent(s): 6f9c52d

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9
2
+
3
+ ARG G4F_IGNORED_PROVIDERS
4
+
5
+ RUN useradd -m -u 1000 user
6
+ WORKDIR /app
7
+
8
+ COPY --chown=user ./requirements.txt requirements.txt
9
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
10
+
11
+ COPY --chown=user . /app
12
+
13
+ USER user
14
+
15
+ ENV HOME=/home/user \
16
+ PATH=/home/user/.local/bin:$PATH
17
+
18
+ ENV G4F_IGNORED_PROVIDERS $G4F_IGNORED_PROVIDERS
19
+
20
+ CMD python -m g4f --port 7860 --debug --ignored-providers $G4F_IGNORED_PROVIDERS