sreepathi-ravikumar commited on
Commit
1699b66
·
verified ·
1 Parent(s): e8addea

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -7
Dockerfile CHANGED
@@ -8,19 +8,23 @@ RUN apt-get update && \
8
  ffmpeg \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
- # Copy requirements first for caching
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
- # Application code
16
  COPY app.py audio_generator.py ./
17
 
18
- # Environment variables
19
- ENV PYTHONUNBUFFERED=1
 
20
 
21
- EXPOSE 7860
 
22
 
23
- HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \
24
- CMD curl -f http://localhost:7860/health || exit 1
 
 
25
 
26
  CMD ["python", "app.py"]
 
8
  ffmpeg \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Copy requirements
12
  COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
 
15
+ # Application files
16
  COPY app.py audio_generator.py ./
17
 
18
+ # Create output directory
19
+ RUN mkdir -p /app/outputs && \
20
+ chmod 777 /app/outputs
21
 
22
+ ENV PYTHONUNBUFFERED=1 \
23
+ PORT=7860
24
 
25
+ EXPOSE ${PORT}
26
+
27
+ HEALTHCHECK --interval=30s --timeout=10s \
28
+ CMD curl -f http://localhost:${PORT}/health || exit 1
29
 
30
  CMD ["python", "app.py"]