Thibault Goehringer
commited on
Commit
·
5ec3cb6
1
Parent(s):
1ef8a31
Update secret name
Browse files- Dockerfile +6 -6
Dockerfile
CHANGED
@@ -8,12 +8,12 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
8 |
|
9 |
COPY . .
|
10 |
|
11 |
-
# Get secret
|
12 |
-
RUN --mount=type=secret,id=
|
13 |
-
cat /run/secrets/
|
14 |
|
15 |
-
# Get secret
|
16 |
-
RUN --mount=type=secret,id=
|
17 |
-
git clone $(cat /run/secrets/
|
18 |
|
19 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
8 |
|
9 |
COPY . .
|
10 |
|
11 |
+
# Get secret openai_api_key and output it to /test at buildtime
|
12 |
+
RUN --mount=type=secret,id=openai_api_key,mode=0444,required=true \
|
13 |
+
cat /run/secrets/openai_api_key > /test
|
14 |
|
15 |
+
# Get secret openai_api_key and clone it as repo at buildtime
|
16 |
+
RUN --mount=type=secret,id=openai_api_key,mode=0444,required=true \
|
17 |
+
git clone $(cat /run/secrets/openai_api_key)
|
18 |
|
19 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|