File size: 1,359 Bytes
0ceb4df
c5f122f
0ceb4df
 
 
 
 
 
 
 
 
 
 
 
 
c5f122f
 
0ceb4df
 
c5f122f
0ceb4df
d6b2a9a
 
0ceb4df
c5f122f
 
0ceb4df
 
d6b2a9a
 
c5f122f
0ceb4df
 
d6b2a9a
0ceb4df
c5f122f
d6b2a9a
0ceb4df
 
 
 
 
 
 
d6b2a9a
 
0ceb4df
c1b748e
 
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Use official Python base image
FROM python:3.10-slim

# App metadata (for Hugging Face Spaces Docker SDK)
LABEL title="MCP Research"
LABEL emoji="🚀"
LABEL colorFrom="red"
LABEL colorTo="red"
LABEL sdk="docker"
LABEL app_port="8501"
LABEL tags="streamlit"
LABEL pinned="false"
LABEL short_description="Streamlit template space"

# Set environment variables for permissions and Streamlit config
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV HOME=/app
ENV STREAMLIT_CONFIG_DIR=/app/.streamlit

# Create working directory
WORKDIR /app

# System deps (edit as needed for your MCP servers)
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
      build-essential \
      curl \
    && rm -rf /var/lib/apt/lists/*

# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt

# Copy the rest of your code
COPY . .

# Create .streamlit directory to avoid permission issues
RUN mkdir -p /app/.streamlit

# Optionally, add default Streamlit config (no telemetry, etc)
RUN echo \"[server]\\nheadless = true\\nport = 8501\\naddress = 0.0.0.0\\n\" > /app/.streamlit/config.toml

# Expose Streamlit's default port
EXPOSE 8501

# Start the Streamlit app
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]