EGYADMIN commited on
Commit
ea506a5
·
verified ·
1 Parent(s): fac206b

Update Dockerfile with optimized settings for Kimi-K2

Browse files
Files changed (1) hide show
  1. Dockerfile +12 -1
Dockerfile CHANGED
@@ -6,17 +6,28 @@ WORKDIR /app
6
  RUN apt-get update && apt-get install -y \
7
  git \
8
  git-lfs \
 
9
  && rm -rf /var/lib/apt/lists/*
10
 
 
 
 
11
  # Install Python packages
12
  COPY requirements.txt .
13
- RUN pip install --no-cache-dir -r requirements.txt
 
14
 
15
  # Copy application files
16
  COPY . .
17
 
18
  # Set up Hugging Face cache directory
19
  ENV HF_HOME=/app/cache
 
 
 
 
 
 
20
 
21
  # Expose port for the application
22
  EXPOSE 7860
 
6
  RUN apt-get update && apt-get install -y \
7
  git \
8
  git-lfs \
9
+ build-essential \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Initialize git-lfs
13
+ RUN git lfs install
14
+
15
  # Install Python packages
16
  COPY requirements.txt .
17
+ RUN pip install --no-cache-dir --upgrade pip && \
18
+ pip install --no-cache-dir -r requirements.txt
19
 
20
  # Copy application files
21
  COPY . .
22
 
23
  # Set up Hugging Face cache directory
24
  ENV HF_HOME=/app/cache
25
+ ENV TRANSFORMERS_CACHE=/app/cache
26
+ ENV HF_HUB_CACHE=/app/cache
27
+
28
+ # Set environment variables for better performance
29
+ ENV PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512
30
+ ENV CUDA_VISIBLE_DEVICES=0,1,2,3
31
 
32
  # Expose port for the application
33
  EXPOSE 7860