Spaces:
Running
Running
Jatin Mehra
commited on
Commit
·
4e55398
1
Parent(s):
0594054
final
Browse files- Dockerfile +8 -2
Dockerfile
CHANGED
|
@@ -10,8 +10,14 @@ COPY requirements.txt .
|
|
| 10 |
# Install dependencies
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
-
#
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
# Copy the rest of the application code into the container
|
| 17 |
COPY . .
|
|
|
|
| 10 |
# Install dependencies
|
| 11 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 12 |
|
| 13 |
+
# Create the directory for Streamlit secrets
|
| 14 |
+
RUN mkdir -p /app/.streamlit
|
| 15 |
+
|
| 16 |
+
# Accept the secret token as a build argument
|
| 17 |
+
ARG SECRET_TOKEN
|
| 18 |
+
|
| 19 |
+
# Create the secrets.toml file with the token
|
| 20 |
+
RUN echo "[general]\nemail = \"[email protected]\"\n\n[api]\ntoken = \"$SECRET_TOKEN\"" > /app/.streamlit/secrets.toml
|
| 21 |
|
| 22 |
# Copy the rest of the application code into the container
|
| 23 |
COPY . .
|