OpceanAI commited on
Commit
dc5a87b
·
verified ·
1 Parent(s): 12c3560

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +1 -20
Dockerfile CHANGED
@@ -3,7 +3,6 @@ FROM python:3.10-slim
3
  WORKDIR /app
4
 
5
  RUN apt-get update && apt-get install -y \
6
- git \
7
  curl \
8
  && rm -rf /var/lib/apt/lists/*
9
 
@@ -12,27 +11,9 @@ RUN pip install --no-cache-dir -r requirements.txt
12
 
13
  COPY app.py .
14
 
15
- # Descargar modelos al construir la imagen
16
- RUN python -c "\
17
- from transformers import AutoTokenizer, AutoModelForCausalLM; \
18
- \
19
- print('Downloading Yuuki NxG tokenizer...'); \
20
- AutoTokenizer.from_pretrained('OpceanAI/Yuuki-NxG'); \
21
- print('Downloading Yuuki NxG model...'); \
22
- AutoModelForCausalLM.from_pretrained('OpceanAI/Yuuki-NxG'); \
23
- print('Yuuki NxG ready!'); \
24
- \
25
- print('Downloading Yuuki Nano tokenizer...'); \
26
- AutoTokenizer.from_pretrained('OpceanAI/Yuuki-Nano'); \
27
- print('Downloading Yuuki Nano model...'); \
28
- AutoModelForCausalLM.from_pretrained('OpceanAI/Yuuki-Nano'); \
29
- print('Yuuki Nano ready!'); \
30
- \
31
- print('All models downloaded!')"
32
-
33
  EXPOSE 7860
34
 
35
  HEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=3 \
36
  CMD curl -f http://localhost:7860/health || exit 1
37
 
38
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
3
  WORKDIR /app
4
 
5
  RUN apt-get update && apt-get install -y \
 
6
  curl \
7
  && rm -rf /var/lib/apt/lists/*
8
 
 
11
 
12
  COPY app.py .
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  EXPOSE 7860
15
 
16
  HEALTHCHECK --interval=30s --timeout=10s --start-period=120s --retries=3 \
17
  CMD curl -f http://localhost:7860/health || exit 1
18
 
19
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]