JFrazUCSF commited on
Commit
8107cb8
·
verified ·
1 Parent(s): 02ea991

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -0
Dockerfile CHANGED
@@ -29,6 +29,23 @@ WORKDIR /home/user/app
29
  RUN git clone --depth 1 https://github.com/CMBAgents/cmbagent.git /home/user/app
30
  RUN pip install --no-cache-dir PyYAML && pip install --no-cache-dir -e .
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  # This informs Docker that the container will listen on port 8501 at runtime.
33
  EXPOSE 8501
34
 
 
29
  RUN git clone --depth 1 https://github.com/CMBAgents/cmbagent.git /home/user/app
30
  RUN pip install --no-cache-dir PyYAML && pip install --no-cache-dir -e .
31
 
32
+ RUN python - <<'PY'
33
+ from pathlib import Path
34
+
35
+ path = Path("/home/user/app/cmbagent/utils/ocr.py")
36
+ text = path.read_text()
37
+
38
+ old = "from mistralai import Mistral, DocumentURLChunk\n"
39
+ new = """try:
40
+ from mistralai import Mistral, DocumentURLChunk
41
+ except Exception:
42
+ Mistral = None
43
+ DocumentURLChunk = None
44
+ """
45
+
46
+ path.write_text(text.replace(old, new))
47
+ PY
48
+
49
  # This informs Docker that the container will listen on port 8501 at runtime.
50
  EXPOSE 8501
51