| FROM python:3.11-slim | |
| ENV DEBIAN_FRONTEND=noninteractive \ | |
| PIP_NO_CACHE_DIR=1 \ | |
| CARGO_HOME=/opt/cargo \ | |
| RUSTUP_HOME=/opt/rustup \ | |
| PATH=/opt/cargo/bin:${PATH} \ | |
| STREAMLIT_SERVER_PORT=7860 \ | |
| STREAMLIT_SERVER_ADDRESS=0.0.0.0 \ | |
| STREAMLIT_SERVER_HEADLESS=true \ | |
| STREAMLIT_BROWSER_GATHER_USAGE_STATS=false | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| ca-certificates \ | |
| curl \ | |
| pkg-config \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable | |
| WORKDIR /app | |
| COPY requirements.txt /app/requirements.txt | |
| RUN pip install --upgrade pip && pip install -r /app/requirements.txt | |
| COPY . /app | |
| RUN cargo build --release --manifest-path /app/rust/fancy_regex_expr_plugin/Cargo.toml | |
| EXPOSE 7860 | |
| CMD ["streamlit", "run", "stwebm_parquet_wa.py", "--server.port=7860", "--server.address=0.0.0.0"] | |