harry-lu-0708 commited on
Commit
8669f7f
·
1 Parent(s): 0913c52

prep for deployment - docker and readme

Browse files
Files changed (4) hide show
  1. .dockerignore +35 -0
  2. Dockerfile +27 -8
  3. README.md +9 -0
  4. pyproject.toml +3 -2
.dockerignore ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .git
2
+ .github
3
+ .venv
4
+ env
5
+ venv
6
+ __pycache__/
7
+ *.pyc
8
+ *.pyo
9
+ *.pyd
10
+ .mypy_cache/
11
+ .pytest_cache/
12
+ .ruff_cache/
13
+ .ipynb_checkpoints/
14
+
15
+ # Local/temporary workspaces and artifacts (keep Docker build context small)
16
+ tmp_*
17
+ rsync_tmp_*
18
+ workspace/
19
+ case-study-memory/
20
+ tmp_brain/
21
+ tmp_ml/
22
+ tmp_ml2/
23
+ tmp_test/
24
+ tmp_test_data/
25
+ tmp_workspace/
26
+ tmp_workspace_full/
27
+ tmp_workflow_workspace/
28
+
29
+ # Not needed for the Space runtime; reduces context size substantially
30
+ software-agent-sdk/
31
+ bench/
32
+ case-studies/
33
+
34
+ # Notebooks
35
+ *.ipynb
Dockerfile CHANGED
@@ -1,20 +1,39 @@
1
- FROM python:3.13.5-slim
2
 
3
  WORKDIR /app
4
 
5
- RUN apt-get update && apt-get install -y \
 
 
 
 
 
 
6
  build-essential \
7
  curl \
8
  git \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- COPY requirements.txt ./
12
- COPY src/ ./src/
 
 
 
 
 
 
 
 
13
 
14
- RUN pip3 install -r requirements.txt
 
 
 
15
 
16
- EXPOSE 8501
 
17
 
18
- HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
 
19
 
20
- ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"]
 
1
+ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
+ ENV PYTHONDONTWRITEBYTECODE=1 \
6
+ PYTHONUNBUFFERED=1 \
7
+ PIP_DISABLE_PIP_VERSION_CHECK=1 \
8
+ PIP_NO_CACHE_DIR=1
9
+
10
+ # System dependencies (keep small; no GPU dependencies)
11
+ RUN apt-get update && apt-get install -y --no-install-recommends \
12
  build-essential \
13
  curl \
14
  git \
15
  && rm -rf /var/lib/apt/lists/*
16
 
17
+ # Copy only what we need to run the Space
18
+ COPY pyproject.toml /app/
19
+ COPY scievo/ /app/scievo/
20
+ COPY streamlit-client/ /app/streamlit-client/
21
+
22
+ # Install Python dependencies from pyproject.toml
23
+ RUN pip install --upgrade pip && \
24
+ pip install .
25
+
26
+ WORKDIR /app/streamlit-client
27
 
28
+ # Runtime writable dirs (HF Spaces container FS is ephemeral; keep within /app)
29
+ RUN mkdir -p /app/streamlit-client/case-study-memory && \
30
+ mkdir -p /app/streamlit-client/workspace && \
31
+ mkdir -p /app/streamlit-client/tmp_brain
32
 
33
+ # Hugging Face Spaces Docker default port
34
+ EXPOSE 7860
35
 
36
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
37
+ CMD curl --fail http://localhost:7860/_stcore/health || exit 1
38
 
39
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0", "--server.headless=true", "--browser.gatherUsageStats=false"]
README.md CHANGED
@@ -1,3 +1,12 @@
 
 
 
 
 
 
 
 
 
1
  # SciEvo
2
 
3
  ```shell
 
1
+ ---
2
+ title: SciEvo
3
+ emoji: 🚀
4
+ colorFrom: indigo
5
+ colorTo: purple
6
+ sdk: docker
7
+ pinned: false
8
+ ---
9
+
10
  # SciEvo
11
 
12
  ```shell
pyproject.toml CHANGED
@@ -7,11 +7,10 @@ name = "scievo"
7
  version = "0.1.0"
8
  description = "Add your description here"
9
  readme = "README.md"
10
- requires-python = ">=3.13"
11
  dependencies = [
12
  "beautifulsoup4>=4.14.2",
13
  "ddgs>=9.6.1",
14
- "epam-indigo==1.35.0",
15
  "feedparser>=6.0.12",
16
  "filetype>=1.2.0",
17
  "jinja2>=3.1.6",
@@ -32,6 +31,8 @@ dependencies = [
32
  "pyyaml>=6.0.3",
33
  "rich>=14.2.0",
34
  "scikit-learn>=1.8.0",
 
 
35
  "tiktoken>=0.12.0",
36
  ]
37
 
 
7
  version = "0.1.0"
8
  description = "Add your description here"
9
  readme = "README.md"
10
+ requires-python = ">=3.11"
11
  dependencies = [
12
  "beautifulsoup4>=4.14.2",
13
  "ddgs>=9.6.1",
 
14
  "feedparser>=6.0.12",
15
  "filetype>=1.2.0",
16
  "jinja2>=3.1.6",
 
31
  "pyyaml>=6.0.3",
32
  "rich>=14.2.0",
33
  "scikit-learn>=1.8.0",
34
+ "streamlit>=1.30.0",
35
+ "watchdog>=3.0.0",
36
  "tiktoken>=0.12.0",
37
  ]
38