garyuzair commited on
Commit
ea3fcfb
Β·
verified Β·
1 Parent(s): ff3ebed

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -8
Dockerfile CHANGED
@@ -2,34 +2,32 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- # System setup with proper permissions
6
  RUN apt-get update && \
7
  apt-get install -y --no-install-recommends \
8
  espeak-ng \
9
- build-essential \
10
  && apt-get clean \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
- # Create cache directories with write permissions
14
  RUN mkdir -p /.cache && \
15
  mkdir -p /.local && \
16
  chmod -R 777 /.cache && \
17
  chmod -R 777 /.local
18
 
19
- # Install Python dependencies
20
  COPY requirements.txt .
21
- RUN pip install --no-cache-dir --user -r requirements.txt
22
 
23
- # Install spaCy model system-wide
24
  RUN python -m spacy download en_core_web_sm
25
 
26
  # Copy application files
27
  COPY *.py .
28
 
29
- # Set environment variables
30
  ENV PYTHONUNBUFFERED=1
31
  ENV HF_HOME=/.cache/huggingface
32
- ENV PIP_NO_CACHE_DIR=false
33
 
34
  EXPOSE 7860
35
 
 
2
 
3
  WORKDIR /app
4
 
5
+ # System setup
6
  RUN apt-get update && \
7
  apt-get install -y --no-install-recommends \
8
  espeak-ng \
 
9
  && apt-get clean \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Create writable directories
13
  RUN mkdir -p /.cache && \
14
  mkdir -p /.local && \
15
  chmod -R 777 /.cache && \
16
  chmod -R 777 /.local
17
 
18
+ # Install Python dependencies with explicit versions
19
  COPY requirements.txt .
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
 
22
+ # Install spaCy model
23
  RUN python -m spacy download en_core_web_sm
24
 
25
  # Copy application files
26
  COPY *.py .
27
 
28
+ # Environment variables
29
  ENV PYTHONUNBUFFERED=1
30
  ENV HF_HOME=/.cache/huggingface
 
31
 
32
  EXPOSE 7860
33