Ali2206 commited on
Commit
5669f62
·
verified ·
1 Parent(s): 125736c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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
- # Clone repositories
 
 
 
13
  RUN git clone https://github.com/mims-harvard/ToolUniverse.git && \
14
  git clone https://github.com/mims-harvard/TxAgent.git
15
 
16
- # Install Python dependencies
17
  COPY requirements.txt .
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
  # Install ToolUniverse and TxAgent from source
21
- RUN cd ToolUniverse && pip install --no-cache-dir . && \
22
- cd ../TxAgent && pip install --no-cache-dir .
23
 
24
- # Copy app files
25
  COPY app.py .
26
  COPY data/ ./data/
27
 
28
- CMD ["python", "app.py"]
 
 
 
 
 
 
 
 
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"]