Discussion about this post

User's avatar
Samith Chimminiyan's avatar

Nice article. I think Hugging Face is also a great option for deployment as it doesn't cost you. Once dockized we can just deployment in Hugging Face.

Samith Chimminiyan's avatar

Since many have shifted from PIP to UV. Below is the minimal Dockerfile template

FROM python:3.11-bullseye

WORKDIR /app

# Install uv

RUN pip install --no-cache-dir uv

# Copy dependency files first

COPY pyproject.toml uv.lock ./

# Install dependencies (creates .venv)

RUN uv sync --frozen

# Ensure venv binaries are used

ENV PATH="/app/.venv/bin:$PATH"

# Copy application code

COPY . .

#Expose the port for streamlit users

EXPOSE 8501

# Run streamlit app

CMD ["streamlit", "run", "app.py", "--host", "0.0.0.0", "--port", "8501"]

3 more comments...

No posts

Ready for more?