hadokenvskikoken commited on
Commit
30f5f22
·
verified ·
1 Parent(s): b3fb970

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -9
Dockerfile CHANGED
@@ -2,7 +2,7 @@ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies (for transformers and other requirements)
6
  RUN apt-get update && apt-get install -y \
7
  git \
8
  gcc \
@@ -10,10 +10,10 @@ RUN apt-get update && apt-get install -y \
10
  make \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Create cache directory with proper permissions
14
  RUN mkdir -p /.cache && chmod -R 777 /.cache
15
 
16
- # Set environment variables for Hugging Face cache
17
  ENV TRANSFORMERS_CACHE=/.cache
18
  ENV HF_HOME=/.cache
19
  ENV HUGGINGFACE_HUB_CACHE=/.cache
@@ -22,12 +22,8 @@ ENV HUGGINGFACE_HUB_CACHE=/.cache
22
  COPY requirements.txt .
23
  RUN pip install --no-cache-dir -r requirements.txt
24
 
25
- # Optionally pre-download the tokenizer during build
26
- # Uncomment if you want to download during build (for smaller models)
27
- # RUN python -c "from transformers import AutoTokenizer; AutoTokenizer.from_pretrained('codellama/CodeLlama-7b-hf')"
28
-
29
- # Copy code
30
- COPY . .
31
 
32
  # Expose port
33
  EXPOSE 7860
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
7
  git \
8
  gcc \
 
10
  make \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
+ # Create cache directory
14
  RUN mkdir -p /.cache && chmod -R 777 /.cache
15
 
16
+ # Set environment variables
17
  ENV TRANSFORMERS_CACHE=/.cache
18
  ENV HF_HOME=/.cache
19
  ENV HUGGINGFACE_HUB_CACHE=/.cache
 
22
  COPY requirements.txt .
23
  RUN pip install --no-cache-dir -r requirements.txt
24
 
25
+ # Copy application code
26
+ COPY main.py .
 
 
 
 
27
 
28
  # Expose port
29
  EXPOSE 7860