File size: 912 Bytes
4f950a7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21dcbc6
4f950a7
45df825
 
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
# Use a lightweight Python image
FROM python:3.9-slim

# Install system dependencies
RUN apt-get update && apt-get install -y \
    libxrender1 \
    libxext6 \
    libgl1-mesa-glx \
    libglib2.0-0 \
    && rm -rf /var/lib/apt/lists/*

# Set the working directory in the container
WORKDIR /app

# Copy all files from the current directory into the container
COPY . /app

# Install system dependencies from packages.txt
RUN apt-get update && xargs -a packages.txt apt-get install -y

# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt

# Expose the port (Streamlit typically uses 8501, but Render will assign a dynamic port)
EXPOSE 8501

# Run the app with Streamlit, using Render's assigned $PORT
CMD streamlit run ChemInsight.py --server.port=${PORT:-7860} --server.address=0.0.0.0 --server.enableCORS=false --server.enableXsrfProtection=false

ENV MPLCONFIGDIR=/tmp/matplotlib