Spaces:
Paused
Paused
ehristoforu
commited on
Commit
•
6431a77
1
Parent(s):
f8d79a9
Upload 2 files
Browse files- Dockerfile +20 -0
- env.local.template +3 -2
Dockerfile
CHANGED
@@ -38,6 +38,24 @@ RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444 \
|
|
38 |
RUN --mount=type=secret,id=ENDPOINT,mode=0444 \
|
39 |
ENDPOINT=$(cat /run/secrets/ENDPOINT) && export ENDPOINT && echo "${ENDPOINT}" >> "/defaults/.endpoint" && cat /defaults/.endpoint
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
RUN --mount=type=secret,id=MONGODB_URL,mode=0444 \
|
43 |
MODEL_NAME="${MODEL_NAME:="$(cat /defaults/MODEL_NAME)"}" && export MODEL_NAME \
|
@@ -52,6 +70,8 @@ RUN --mount=type=secret,id=MONGODB_URL,mode=0444 \
|
|
52 |
&& FREEGPT_API_KEY=$(cat /defaults/.freegpt.key) && export FREEGPT_API_KEY && echo "${FREEGPT_API_KEY}" \
|
53 |
&& GROQ_API_KEY=$(cat /defaults/.groq.key) && export GROQ_API_KEY && echo "${GROQ_API_KEY}" \
|
54 |
&& VISIONCRAFT_API_KEY=$(cat /defaults/.visioncraft.key) && export VISIONCRAFT_API_KEY && echo "${VISIONCRAFT_API_KEY}" \
|
|
|
|
|
55 |
&& envsubst < ".env.local.template" > ".env.local" \
|
56 |
&& rm .env.local.template && cat .env.local
|
57 |
|
|
|
38 |
RUN --mount=type=secret,id=ENDPOINT,mode=0444 \
|
39 |
ENDPOINT=$(cat /run/secrets/ENDPOINT) && export ENDPOINT && echo "${ENDPOINT}" >> "/defaults/.endpoint" && cat /defaults/.endpoint
|
40 |
|
41 |
+
RUN --mount=type=secret,id=GEMINI_API_KEY,mode=0444 \
|
42 |
+
ENDPOINT=$(cat /run/secrets/GEMINI_API_KEY) && export GEMINI_API_KEY && echo "${GEMINI_API_KEY}" >> "/defaults/.gemini.key" && cat /defaults/.gemini.key
|
43 |
+
|
44 |
+
RUN --mount=type=secret,id=FREEGPT_API_KEY,mode=0444 \
|
45 |
+
ENDPOINT=$(cat /run/secrets/FREEGPT_API_KEY) && export FREEGPT_API_KEY && echo "${FREEGPT_API_KEY}" >> "/defaults/.freegpt.key" && cat /defaults/.freegpt.key
|
46 |
+
|
47 |
+
RUN --mount=type=secret,id=GROQ_API_KEY,mode=0444 \
|
48 |
+
ENDPOINT=$(cat /run/secrets/GROQ_API_KEY) && export GROQ_API_KEY && echo "${GROQ_API_KEY}" >> "/defaults/.groq.key" && cat /defaults/.groq.key
|
49 |
+
|
50 |
+
RUN --mount=type=secret,id=VISIONCRAFT_API_KEY,mode=0444 \
|
51 |
+
ENDPOINT=$(cat /run/secrets/VISIONCRAFT_API_KEY) && export VISIONCRAFT_API_KEY && echo "${VISIONCRAFT_API_KEY}" >> "/defaults/.visioncraft.key" && cat /defaults/.visioncraft.key
|
52 |
+
|
53 |
+
RUN --mount=type=secret,id=OPENID_CLIENT_ID,mode=0444 \
|
54 |
+
ENDPOINT=$(cat /run/secrets/OPENID_CLIENT_ID) && export OPENID_CLIENT_ID && echo "${OPENID_CLIENT_ID}" >> "/defaults/.openid.client_id" && cat /defaults/.openid.client_id
|
55 |
+
|
56 |
+
RUN --mount=type=secret,id=OPENID_CLIENT_SECRET,mode=0444 \
|
57 |
+
ENDPOINT=$(cat /run/secrets/OPENID_CLIENT_SECRET) && export OPENID_CLIENT_SECRET && echo "${OPENID_CLIENT_SECRET}" >> "/defaults/.openid.client_secret" && cat /defaults/.openid.client_secret
|
58 |
+
|
59 |
|
60 |
RUN --mount=type=secret,id=MONGODB_URL,mode=0444 \
|
61 |
MODEL_NAME="${MODEL_NAME:="$(cat /defaults/MODEL_NAME)"}" && export MODEL_NAME \
|
|
|
70 |
&& FREEGPT_API_KEY=$(cat /defaults/.freegpt.key) && export FREEGPT_API_KEY && echo "${FREEGPT_API_KEY}" \
|
71 |
&& GROQ_API_KEY=$(cat /defaults/.groq.key) && export GROQ_API_KEY && echo "${GROQ_API_KEY}" \
|
72 |
&& VISIONCRAFT_API_KEY=$(cat /defaults/.visioncraft.key) && export VISIONCRAFT_API_KEY && echo "${VISIONCRAFT_API_KEY}" \
|
73 |
+
&& OPENID_CLIENT_ID=$(cat /defaults/.openid.client_id) && export OPENID_CLIENT_ID && echo "${OPENID_CLIENT_ID}" \
|
74 |
+
&& OPENID_CLIENT_SECRET=$(cat /defaults/.openid.client_secret) && export OPENID_CLIENT_SECRET && echo "${OPENID_CLIENT_SECRET}" \
|
75 |
&& envsubst < ".env.local.template" > ".env.local" \
|
76 |
&& rm .env.local.template && cat .env.local
|
77 |
|
env.local.template
CHANGED
@@ -13,12 +13,13 @@ HF_ACCESS_TOKEN=#hf_<token> from from https://huggingface.co/settings/token
|
|
13 |
SERPAPI_KEY=#your serpapi key here
|
14 |
|
15 |
# Parameters to enable "Sign in with HF"
|
16 |
-
OPENID_CLIENT_ID
|
17 |
-
OPENID_CLIENT_SECRET
|
18 |
OPENID_SCOPES="openid profile" # Add "email" for some providers like Google that do not provide preferred_username
|
19 |
OPENID_PROVIDER_URL=https://huggingface.co # for Google, use https://accounts.google.com
|
20 |
|
21 |
|
|
|
22 |
MODELS=`[
|
23 |
{
|
24 |
"name": "gpt-3.5-turbo",
|
|
|
13 |
SERPAPI_KEY=#your serpapi key here
|
14 |
|
15 |
# Parameters to enable "Sign in with HF"
|
16 |
+
OPENID_CLIENT_ID=${OPENID_CLIENT_ID}
|
17 |
+
OPENID_CLIENT_SECRET=${OPENID_CLIENT_SECRET}
|
18 |
OPENID_SCOPES="openid profile" # Add "email" for some providers like Google that do not provide preferred_username
|
19 |
OPENID_PROVIDER_URL=https://huggingface.co # for Google, use https://accounts.google.com
|
20 |
|
21 |
|
22 |
+
|
23 |
MODELS=`[
|
24 |
{
|
25 |
"name": "gpt-3.5-turbo",
|