nexusbert commited on
Commit
f990999
·
1 Parent(s): a68b574

upush docker

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. dockerfile +0 -42
Dockerfile CHANGED
@@ -39,4 +39,4 @@ COPY . .
39
 
40
  EXPOSE 7860
41
 
42
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
39
 
40
  EXPOSE 7860
41
 
42
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2", "--timeout-keep-alive", "30"]
dockerfile DELETED
@@ -1,42 +0,0 @@
1
- FROM python:3.10-slim
2
-
3
- ARG HF_TOKEN
4
-
5
- ENV DEBIAN_FRONTEND=noninteractive \
6
- PYTHONUNBUFFERED=1 \
7
- PYTHONDONTWRITEBYTECODE=1 \
8
- HF_TOKEN=${HF_TOKEN}
9
-
10
- WORKDIR /code
11
-
12
- # System Dependencies
13
- RUN apt-get update && apt-get install -y --no-install-recommends \
14
- build-essential \
15
- git \
16
- curl \
17
- libopenblas-dev \
18
- libomp-dev \
19
- && rm -rf /var/lib/apt/lists/*
20
-
21
- # Copy requirements and install Python dependencies
22
- COPY requirements.txt .
23
- RUN pip install --no-cache-dir -r requirements.txt
24
-
25
- # Hugging Face dependencies
26
- RUN pip install --no-cache-dir huggingface-hub sentencepiece
27
-
28
- # Hugging Face cache environment
29
- ENV HF_HOME=/data/huggingface \
30
- HUGGINGFACE_HUB_CACHE=/data/huggingface \
31
- HF_HUB_CACHE=/data/huggingface \
32
- API_PORT=7860
33
-
34
- # Create cache dir and set permissions
35
- RUN mkdir -p /data/huggingface && chmod -R 777 /data
36
-
37
- # Copy project files
38
- COPY . .
39
-
40
- EXPOSE 7860
41
-
42
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2", "--timeout-keep-alive", "30"]