-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (25 loc) · 971 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (25 loc) · 971 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 3.11-slim (Debian bookworm, glibc 2.36): mlx only ships wheels for
# Python >= 3.10 and glibc >= 2.35 — the build fails on python:3.9-slim.
FROM python:3.11-slim
WORKDIR /app
# Install system tools
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
# --- THE MAGIC FIX ---
# This forces Streamlit to print "http://localhost:8501" instead of "0.0.0.0"
RUN mkdir -p /root/.streamlit
RUN bash -c 'echo -e "[browser]\nserverAddress = \"localhost\"\nserverPort = 8501" > /root/.streamlit/config.toml'
# ---------------------
# Copy the app code
COPY . .
# Expose the port
EXPOSE 8501
# Run the app
# Note: We still bind to 0.0.0.0 internally so Docker works, but the config above fixes the display.
ENTRYPOINT ["streamlit", "run", "alpha_engine.py", "--server.port=8501", "--server.address=0.0.0.0"]