VcRlAgent commited on
Commit
36e9dce
·
1 Parent(s): 716d551

To RunPod

Browse files
Files changed (2) hide show
  1. Dockerfile +6 -1
  2. entrypoint.sh +6 -0
Dockerfile CHANGED
@@ -10,14 +10,19 @@ RUN apt-get update && apt-get install -y \
10
  WORKDIR /app
11
 
12
  COPY ../requirements.txt .
13
- RUN pip install --no-cache-dir -r requirements.txt
14
 
15
  # Pre-download model (faster cold starts)
16
  RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')"
17
 
 
 
 
18
  COPY . .
19
 
20
  EXPOSE 7860
21
 
 
 
22
  CMD ["python", "handler.py"]
23
  # CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
10
  WORKDIR /app
11
 
12
  COPY ../requirements.txt .
13
+ RUN pip install -v --no-cache-dir -r requirements.txt
14
 
15
  # Pre-download model (faster cold starts)
16
  RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')"
17
 
18
+ COPY entrypoint.sh /entrypoint.sh
19
+ RUN chmod +x /entrypoint.sh
20
+
21
  COPY . .
22
 
23
  EXPOSE 7860
24
 
25
+ ENV RUNPOD_VERBOSE=1
26
+ CMD ["/entrypoint.sh"]
27
  CMD ["python", "handler.py"]
28
  # CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
entrypoint.sh ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ set -e
3
+ echo "🚀 Starting container in $(pwd)"
4
+ ls -la
5
+ echo "Launching FastAPI..."
6
+ exec python -m uvicorn app.main:app --host 0.0.0.0 --port 8000