AurelioAguirre commited on
Commit
b18273d
·
1 Parent(s): 2f91434

Fixing wget issue v2

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -5
Dockerfile CHANGED
@@ -4,7 +4,7 @@ FROM python:3.10-slim
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Install git, wget, and required system dependencies
8
  RUN apt-get update && \
9
  apt-get install -y \
10
  git \
@@ -12,13 +12,16 @@ RUN apt-get update && \
12
  && apt-get clean \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
- # Create cache directory and set permissions
16
  RUN mkdir -p /app/.cache/huggingface && \
17
- chmod 777 /app/.cache/huggingface
 
 
18
 
19
- # Set environment variables for cache
20
  ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/hub
21
  ENV HF_HOME=/app/.cache/huggingface
 
22
 
23
  # Copy requirements first to leverage Docker cache
24
  COPY requirements.txt .
@@ -41,7 +44,7 @@ RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true \
41
  # Copy the rest of the application
42
  COPY . .
43
 
44
- # Set environment variables
45
  ENV LLM_ENGINE_HOST=0.0.0.0
46
  ENV LLM_ENGINE_PORT=7860
47
  ENV MODEL_PATH=/app/main/checkpoints/mistralai/Mistral-7B-Instruct-v0.3
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install required system dependencies
8
  RUN apt-get update && \
9
  apt-get install -y \
10
  git \
 
12
  && apt-get clean \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Create and set permissions for directories
16
  RUN mkdir -p /app/.cache/huggingface && \
17
+ chmod 777 /app/.cache/huggingface && \
18
+ mkdir -p /app/.git && \
19
+ chmod 777 /app/.git
20
 
21
+ # Set environment variables
22
  ENV TRANSFORMERS_CACHE=/app/.cache/huggingface/hub
23
  ENV HF_HOME=/app/.cache/huggingface
24
+ ENV GIT_CONFIG_GLOBAL=/app/.git/config
25
 
26
  # Copy requirements first to leverage Docker cache
27
  COPY requirements.txt .
 
44
  # Copy the rest of the application
45
  COPY . .
46
 
47
+ # Set environment variables for the application
48
  ENV LLM_ENGINE_HOST=0.0.0.0
49
  ENV LLM_ENGINE_PORT=7860
50
  ENV MODEL_PATH=/app/main/checkpoints/mistralai/Mistral-7B-Instruct-v0.3