Spaces:
Sleeping
Sleeping
Next7years
commited on
Commit
•
7652618
1
Parent(s):
c303997
dafs
Browse files- Dockerfile +10 -1
- README.md +1 -1
Dockerfile
CHANGED
@@ -6,6 +6,15 @@ COPY ./requirements.txt /code/requirements.txt
|
|
6 |
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
COPY . .
|
10 |
|
11 |
-
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "
|
|
|
6 |
|
7 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
8 |
|
9 |
+
# Expose the secret SECRET_EXAMPLE at buildtime and use its value as git remote URL
|
10 |
+
RUN --mount=type=secret,id=SECRET_EXAMPLE,mode=0444,required=true \
|
11 |
+
git init && \
|
12 |
+
git remote add origin $(cat /run/secrets/SECRET_EXAMPLE)
|
13 |
+
|
14 |
+
# Expose the secret SECRET_EXAMPLE at buildtime and use its value as a Bearer token for a curl request
|
15 |
+
RUN --mount=type=secret,id=SECRET_EXAMPLE,mode=0444,required=true \
|
16 |
+
curl test -H 'Authorization: Bearer $(cat /run/secrets/SECRET_EXAMPLE)'
|
17 |
+
|
18 |
COPY . .
|
19 |
|
20 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7861"]
|
README.md
CHANGED
@@ -6,7 +6,7 @@ colorTo: pink
|
|
6 |
sdk: docker
|
7 |
pinned: false
|
8 |
license: openrail
|
9 |
-
app_port:
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
6 |
sdk: docker
|
7 |
pinned: false
|
8 |
license: openrail
|
9 |
+
app_port: 7861
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|