Jenak5 commited on
Commit
70a95b7
·
verified ·
1 Parent(s): e33e571

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -6
Dockerfile CHANGED
@@ -2,19 +2,21 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install git for cloning Kronos model code
6
  RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
7
 
8
- # Clone Kronos model code (we only need the model/ directory)
9
- RUN git clone --depth 1 https://github.com/shiyu-coder/Kronos.git /tmp/kronos && \
10
- cp -r /tmp/kronos/model /app/model && \
11
- rm -rf /tmp/kronos
12
 
13
  COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
 
 
 
16
  COPY app.py .
17
 
 
 
18
  EXPOSE 7860
19
 
20
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
6
 
7
+ # Clone the full Kronos repo
8
+ RUN git clone --depth 1 https://github.com/shiyu-coder/Kronos.git /app/kronos
 
 
9
 
10
  COPY requirements.txt .
11
  RUN pip install --no-cache-dir -r requirements.txt
12
 
13
+ # Install Kronos's own dependencies if they exist
14
+ RUN if [ -f /app/kronos/requirements.txt ]; then pip install --no-cache-dir -r /app/kronos/requirements.txt; fi
15
+
16
  COPY app.py .
17
 
18
+ ENV PYTHONPATH="/app/kronos:${PYTHONPATH}"
19
+
20
  EXPOSE 7860
21
 
22
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]