Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +6 -3
Dockerfile
CHANGED
@@ -40,10 +40,13 @@ COPY --chown=worker *.yaml *.md ./
|
|
40 |
|
41 |
USER worker
|
42 |
|
43 |
-
#
|
44 |
RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
47 |
|
48 |
# Activate the virtual environment and run uvicorn
|
49 |
CMD [".venv/bin/python", "-m", "uvicorn", "private_gpt.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
40 |
|
41 |
USER worker
|
42 |
|
43 |
+
# Get secret EXAMPLE and output it to /test at buildtime
|
44 |
RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
|
45 |
+
cat /run/secrets/OPENAI_API_KEY > /test
|
46 |
+
|
47 |
+
# Get secret SECRET_EXAMPLE and clone it as repo at buildtime
|
48 |
+
RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
|
49 |
+
git clone $(cat /run/secrets/OPENAI_API_KEY)
|
50 |
|
51 |
# Activate the virtual environment and run uvicorn
|
52 |
CMD [".venv/bin/python", "-m", "uvicorn", "private_gpt.main:app", "--host", "0.0.0.0", "--port", "7860"]
|