Update Dockerfile
Browse files- Dockerfile +23 -6
Dockerfile
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
|
|
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
# Install system dependencies
|
|
@@ -7,22 +8,38 @@ RUN apt-get update && apt-get install -y \
|
|
| 7 |
git \
|
| 8 |
gcc \
|
| 9 |
g++ \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
-
#
|
|
|
|
|
|
|
|
|
|
| 13 |
RUN git clone https://github.com/mims-harvard/ToolUniverse.git && \
|
| 14 |
git clone https://github.com/mims-harvard/TxAgent.git
|
| 15 |
|
| 16 |
-
# Install
|
| 17 |
COPY requirements.txt .
|
| 18 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 19 |
|
| 20 |
# Install ToolUniverse and TxAgent from source
|
| 21 |
-
RUN
|
| 22 |
-
|
| 23 |
|
| 24 |
-
# Copy app
|
| 25 |
COPY app.py .
|
| 26 |
COPY data/ ./data/
|
| 27 |
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
+
# Set working directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
# Install system dependencies
|
|
|
|
| 8 |
git \
|
| 9 |
gcc \
|
| 10 |
g++ \
|
| 11 |
+
curl \
|
| 12 |
+
build-essential \
|
| 13 |
+
libglib2.0-0 \
|
| 14 |
+
libsm6 \
|
| 15 |
+
libxext6 \
|
| 16 |
+
libxrender-dev \
|
| 17 |
&& rm -rf /var/lib/apt/lists/*
|
| 18 |
|
| 19 |
+
# Upgrade pip
|
| 20 |
+
RUN pip install --no-cache-dir --upgrade pip
|
| 21 |
+
|
| 22 |
+
# Clone required GitHub repos
|
| 23 |
RUN git clone https://github.com/mims-harvard/ToolUniverse.git && \
|
| 24 |
git clone https://github.com/mims-harvard/TxAgent.git
|
| 25 |
|
| 26 |
+
# Install core dependencies
|
| 27 |
COPY requirements.txt .
|
| 28 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 29 |
|
| 30 |
# Install ToolUniverse and TxAgent from source
|
| 31 |
+
RUN pip install --no-cache-dir ./ToolUniverse && \
|
| 32 |
+
pip install --no-cache-dir ./TxAgent
|
| 33 |
|
| 34 |
+
# Copy your main app code
|
| 35 |
COPY app.py .
|
| 36 |
COPY data/ ./data/
|
| 37 |
|
| 38 |
+
# Ensure data dir exists and has write perms
|
| 39 |
+
RUN mkdir -p /app/models && chmod -R 777 /app/data /app/models
|
| 40 |
+
|
| 41 |
+
# Expose Gradio port
|
| 42 |
+
EXPOSE 7860
|
| 43 |
+
|
| 44 |
+
# Run the app
|
| 45 |
+
CMD ["python", "app.py"]
|