Synced repo using 'sync_with_huggingface' Github Action
Browse files- Dockerfile +5 -5
- entrypoint.sh +15 -0
Dockerfile
CHANGED
|
@@ -1,9 +1,6 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
# Use an official Python runtime as a parent image
|
| 4 |
FROM python:3.11-slim
|
| 5 |
|
| 6 |
-
|
| 7 |
# Set the working directory in the container
|
| 8 |
WORKDIR /app
|
| 9 |
|
|
@@ -21,8 +18,11 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 21 |
# Copy the rest of your app's code
|
| 22 |
COPY . .
|
| 23 |
|
|
|
|
|
|
|
|
|
|
| 24 |
# Expose the port Streamlit runs on
|
| 25 |
EXPOSE 8501
|
| 26 |
|
| 27 |
-
#
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
| 1 |
# Use an official Python runtime as a parent image
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
|
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
|
|
|
| 18 |
# Copy the rest of your app's code
|
| 19 |
COPY . .
|
| 20 |
|
| 21 |
+
# Make entrypoint script executable
|
| 22 |
+
RUN chmod +x /app/entrypoint.sh
|
| 23 |
+
|
| 24 |
# Expose the port Streamlit runs on
|
| 25 |
EXPOSE 8501
|
| 26 |
|
| 27 |
+
# Use the entrypoint script to run all scripts in order, then launch Streamlit
|
| 28 |
+
ENTRYPOINT ["/app/entrypoint.sh"]
|
entrypoint.sh
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
set -e
|
| 3 |
+
|
| 4 |
+
# Optional: echo for debugging
|
| 5 |
+
echo "Running scrape_chroma.py..."
|
| 6 |
+
python scrape_chroma.py
|
| 7 |
+
|
| 8 |
+
echo "Encrypting ChromaDB..."
|
| 9 |
+
python encrypt_chroma.py
|
| 10 |
+
|
| 11 |
+
echo "Decrypting ChromaDB..."
|
| 12 |
+
python decrypt_chroma.py
|
| 13 |
+
|
| 14 |
+
echo "Starting Streamlit app..."
|
| 15 |
+
streamlit run app.py --server.port=8501 --server.address=0.0.0.0
|