VcRlAgent commited on
Commit
8f4830c
·
1 Parent(s): 106f3dd
Dockerfile CHANGED
@@ -1,17 +1,23 @@
1
- FROM python:3.11-slim
 
 
 
 
 
 
 
2
 
3
  WORKDIR /app
4
 
5
- COPY requirements.txt .
 
6
 
7
- RUN pip install --no-cache-dir -U pip && \
8
- pip install --no-cache-dir -r requirements.txt
9
- #RUN pip install --no-cache-dir -r requirements.txt
10
 
11
- COPY . /app
12
- #COPY app/ ./app/
13
- #COPY data/ ./data/
14
 
15
  EXPOSE 7860
16
 
17
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
+ FROM runpod/pytorch:2.2.0-py3.10-cuda12.1.1-devel-ubuntu22.04
2
+
3
+ # Install Python
4
+ RUN apt-get update && apt-get install -y \
5
+ python3.10 \
6
+ python3-pip \
7
+ git \
8
+ && rm -rf /var/lib/apt/lists/*
9
 
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"]
backup/HF/Dockerfile ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ COPY requirements.txt .
6
+
7
+ RUN pip install --no-cache-dir -U pip && \
8
+ pip install --no-cache-dir -r requirements.txt
9
+ #RUN pip install --no-cache-dir -r requirements.txt
10
+
11
+ COPY . /app
12
+ #COPY app/ ./app/
13
+ #COPY data/ ./data/
14
+
15
+ EXPOSE 7860
16
+
17
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
Dockerfile.bak → backup/HF/Dockerfile.bak RENAMED
File without changes
Dockerfile.bak1 → backup/HF/Dockerfile.bak1 RENAMED
File without changes
Space.yaml → backup/HF/Space.yaml RENAMED
@@ -30,5 +30,4 @@ env:
30
  value: "0"
31
 
32
  # If your app uses secrets (API keys, vector DB URL), define them via
33
- # “Settings → Repository secrets” in Hugging Face UI (not here)
34
-
 
30
  value: "0"
31
 
32
  # If your app uses secrets (API keys, vector DB URL), define them via
33
+ # “Settings → Repository secrets” in Hugging Face UI (not here)
 
requirements.txt → backup/HF/requirements.txt RENAMED
File without changes
backup/docker-runpod/Dockerfile DELETED
@@ -1,23 +0,0 @@
1
- FROM runpod/pytorch:2.2.0-py3.10-cuda12.1.1-devel-ubuntu22.04
2
-
3
- # Install Python
4
- RUN apt-get update && apt-get install -y \
5
- python3.10 \
6
- python3-pip \
7
- git \
8
- && rm -rf /var/lib/apt/lists/*
9
-
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"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
backup/{requirements.txt.runpod → runpod/requirements.txt.runpod} RENAMED
File without changes
backup/handler.py.bak → handler.py RENAMED
File without changes