Add Docker, bash launcher, and Linux-first README
Lets the project be served as a web app from a Linux host in one command: - Dockerfile (python:3.12-slim + non-root user + streamlit healthcheck) - docker-compose.yml with env_file, restart policy, configurable HOST_PORT, and an optional CA-bundle volume for self-signed GPFS GUIs - .dockerignore to keep the image lean - run.sh for native (non-Docker) runs: creates a venv on first use and launches either the Streamlit UI (default) or the REPL - .gitattributes pins LF line endings on shell/yaml/py so scripts stay executable when checked out on Linux from a Windows host - README rewritten with Linux/Docker quick starts in front, Windows behind Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
8840ba74f7
commit
0d75d73c23
6 changed files with 176 additions and 33 deletions
31
Dockerfile
Normal file
31
Dockerfile
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
FROM python:3.12-slim AS base
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PIP_DISABLE_PIP_VERSION_CHECK=1 \
|
||||
PIP_NO_CACHE_DIR=1 \
|
||||
STREAMLIT_SERVER_ADDRESS=0.0.0.0 \
|
||||
STREAMLIT_SERVER_PORT=8501 \
|
||||
STREAMLIT_SERVER_HEADLESS=true \
|
||||
STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends curl ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY requirements.txt ./
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
COPY gpfs_agent ./gpfs_agent
|
||||
|
||||
RUN useradd --create-home --uid 10001 app && chown -R app:app /app
|
||||
USER app
|
||||
|
||||
EXPOSE 8501
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
|
||||
CMD curl -fsS http://localhost:8501/_stcore/health || exit 1
|
||||
|
||||
CMD ["streamlit", "run", "gpfs_agent/web.py"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue