test / Dockerfile
Ali2206's picture
Update Dockerfile
5669f62 verified
FROM python:3.10-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
gcc \
g++ \
curl \
build-essential \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender-dev \
&& rm -rf /var/lib/apt/lists/*
# Upgrade pip
RUN pip install --no-cache-dir --upgrade pip
# Clone required GitHub repos
RUN git clone https://github.com/mims-harvard/ToolUniverse.git && \
git clone https://github.com/mims-harvard/TxAgent.git
# Install core dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Install ToolUniverse and TxAgent from source
RUN pip install --no-cache-dir ./ToolUniverse && \
pip install --no-cache-dir ./TxAgent
# Copy your main app code
COPY app.py .
COPY data/ ./data/
# Ensure data dir exists and has write perms
RUN mkdir -p /app/models && chmod -R 777 /app/data /app/models
# Expose Gradio port
EXPOSE 7860
# Run the app
CMD ["python", "app.py"]