sreepathi-ravikumar commited on
Commit
22eb489
·
verified ·
1 Parent(s): 0fb0cc3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -23
Dockerfile CHANGED
@@ -2,35 +2,18 @@ FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies
6
  RUN apt-get update && \
7
- apt-get install -y --no-install-recommends \
8
- gcc \
9
- python3-dev \
10
- ffmpeg \
11
- libimage-exiftool-perl \
12
- imagemagick \
13
- && rm -rf /var/lib/apt/lists/*
14
 
15
- # Copy requirements first for caching
16
  COPY requirements.txt .
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
- # Application code
20
- COPY app.py text2generation.py video_processor.py ./
21
-
22
- # Environment variables
23
- ENV TRANSFORMERS_CACHE=/tmp/cache \
24
- HF_HOME=/tmp/cache \
25
- PYTHONUNBUFFERED=1
26
-
27
- # Create cache directory
28
- RUN mkdir -p /tmp/cache && \
29
- chmod 777 /tmp/cache
30
 
31
  EXPOSE 7860
32
 
33
- HEALTHCHECK --interval=30s --timeout=30s --start-period=30s --retries=3 \
34
- CMD curl -f http://localhost:7860/health || exit 1
35
-
36
  CMD ["python", "app.py"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install required system packages
6
  RUN apt-get update && \
7
+ apt-get install -y curl && \
8
+ rm -rf /var/lib/apt/lists/*
 
 
 
 
 
9
 
10
+ # Copy and install dependencies
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # Copy application files
15
+ COPY app.py audio_generator.py ./
 
 
 
 
 
 
 
 
 
16
 
17
  EXPOSE 7860
18
 
 
 
 
19
  CMD ["python", "app.py"]