Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +0 -7
Dockerfile
CHANGED
@@ -40,17 +40,10 @@ COPY --chown=worker *.yaml *.md ./
|
|
40 |
|
41 |
USER worker
|
42 |
|
43 |
-
# Install git
|
44 |
-
RUN apt-get update && apt-get install -y git
|
45 |
-
|
46 |
# Expose the secret SECRET_EXAMPLE at buildtime and use its value as git remote URL
|
47 |
RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
|
48 |
git init && \
|
49 |
git remote add origin $(cat /run/secrets/OPENAI_API_KEY)
|
50 |
-
|
51 |
-
# Expose the secret SECRET_EXAMPLE at buildtime and use its value as a Bearer token for a curl request
|
52 |
-
RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
|
53 |
-
curl test -H 'Authorization: Bearer $(cat /run/secrets/OPENAI_API_KEY)'
|
54 |
|
55 |
# Activate the virtual environment and run uvicorn
|
56 |
CMD [".venv/bin/python", "-m", "uvicorn", "private_gpt.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
40 |
|
41 |
USER worker
|
42 |
|
|
|
|
|
|
|
43 |
# Expose the secret SECRET_EXAMPLE at buildtime and use its value as git remote URL
|
44 |
RUN --mount=type=secret,id=OPENAI_API_KEY,mode=0444,required=true \
|
45 |
git init && \
|
46 |
git remote add origin $(cat /run/secrets/OPENAI_API_KEY)
|
|
|
|
|
|
|
|
|
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"]
|