duds1977 commited on
Commit
4048e22
·
verified ·
1 Parent(s): ca1229f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -1
Dockerfile CHANGED
@@ -1,5 +1,8 @@
1
  FROM python:3.11-slim
2
 
 
 
 
3
  WORKDIR /app
4
 
5
  RUN apt-get update && apt-get install -y \
@@ -9,9 +12,11 @@ RUN apt-get update && apt-get install -y \
9
  bash \
10
  && rm -rf /var/lib/apt/lists/*
11
 
 
 
 
12
  COPY requirements.txt /app/
13
  RUN pip install --no-cache-dir -r requirements.txt
14
-
15
  RUN pip install --no-cache-dir open-webui
16
 
17
  COPY . /app
@@ -19,10 +24,17 @@ COPY nginx.conf /etc/nginx/nginx.conf
19
 
20
  RUN chmod +x /app/start.sh
21
 
 
22
  ENV WEBUI_AUTH=True
23
  ENV ENABLE_SIGNUP=False
24
  ENV WEBUI_AUTH_TRUSTED_EMAIL_HEADER=X-User-Email
25
  ENV WEBUI_AUTH_TRUSTED_NAME_HEADER=X-User-Name
 
 
 
 
 
 
26
 
27
  EXPOSE 7860
28
 
 
1
  FROM python:3.11-slim
2
 
3
+ ENV PYTHONDONTWRITEBYTECODE=1
4
+ ENV PYTHONUNBUFFERED=1
5
+
6
  WORKDIR /app
7
 
8
  RUN apt-get update && apt-get install -y \
 
12
  bash \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Install Ollama
16
+ RUN curl -fsSL https://ollama.com/install.sh | sh
17
+
18
  COPY requirements.txt /app/
19
  RUN pip install --no-cache-dir -r requirements.txt
 
20
  RUN pip install --no-cache-dir open-webui
21
 
22
  COPY . /app
 
24
 
25
  RUN chmod +x /app/start.sh
26
 
27
+ # Open WebUI auth + trusted-header setup
28
  ENV WEBUI_AUTH=True
29
  ENV ENABLE_SIGNUP=False
30
  ENV WEBUI_AUTH_TRUSTED_EMAIL_HEADER=X-User-Email
31
  ENV WEBUI_AUTH_TRUSTED_NAME_HEADER=X-User-Name
32
+ ENV DEFAULT_USER_ROLE=user
33
+ ENV WEBUI_SECRET_KEY=9f3c6b2e8d1a4f7c5e9b0d2a6c8f1e3b7d4a9c6e2f8b1d0c5a7e3f9b2c6d8a1
34
+ ENV ADMIN_BOOTSTRAP_TOKEN=11BGSJJVQ0WTNYwyjJK538_woa9FJKOHfBrwqGwzQb7YdyiD8qM1uAPcYwrfPc6mGiX6SYMJ6KOEzo7oKc
35
+
36
+ # Open WebUI -> Ollama
37
+ ENV OLLAMA_BASE_URL=http://127.0.0.1:11434
38
 
39
  EXPOSE 7860
40