anyone-docking / Dockerfile
kowith-2's picture
Upload 6 files
99aa8e9 verified
Raw History Blame Contribute Delete
2.14 kB
FROM python:3.11-slim
# ── System packages ───────────────────────────────────────────────────────────
# Split into two layers so apt failures are easier to debug
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
wget \
git \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y --no-install-recommends \
openbabel \
libopenbabel-dev \
libcairo2-dev \
libpango1.0-dev \
libpangocairo-1.0-0 \
pkg-config \
python3-dev \
libgirepository1.0-dev \
&& rm -rf /var/lib/apt/lists/*
# ── Working directory ─────────────────────────────────────────────────────────
WORKDIR /app
# ── Python packages: install heaviest first so layer cache is useful ──────────
# Step 1: numpy/scipy (fast, small)
RUN pip install --no-cache-dir numpy scipy
# Step 2: rdkit (large ~300MB β€” separate layer so it's cached)
RUN pip install --no-cache-dir rdkit
# Step 3: remaining requirements
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# ── App files ─────────────────────────────────────────────────────────────────
COPY . .
# ── HuggingFace Spaces uses port 7860 ────────────────────────────────────────
EXPOSE 7860
ENV STREAMLIT_SERVER_PORT=7860
ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0
ENV STREAMLIT_SERVER_HEADLESS=true
ENV STREAMLIT_SERVER_FILE_WATCHER_TYPE=none
ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
CMD ["streamlit", "run", "app.py", \
"--server.port=7860", \
"--server.address=0.0.0.0", \
"--server.headless=true", \
"--server.fileWatcherType=none", \
"--browser.gatherUsageStats=false"]