Echo-ai commited on
Commit
2d67a59
·
verified ·
1 Parent(s): d244e05

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -6
Dockerfile CHANGED
@@ -1,10 +1,8 @@
1
- # Use a lightweight Python base image
2
  FROM python:3.9-slim
3
 
4
- # Set working directory
5
  WORKDIR /app
6
 
7
- # Install system dependencies (e.g., for edge-tts or audio handling if needed)
8
  RUN apt-get update && apt-get install -y \
9
  wget \
10
  && rm -rf /var/lib/apt/lists/*
@@ -16,8 +14,9 @@ RUN wget -O edge_tts-api.py "https://huggingface.co/datasets/gefiwek187/realtime
16
  # Install Python dependencies
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
- # Expose the port Hugging Face Spaces expects
 
 
20
  EXPOSE 7860
21
 
22
- # Command to run the FastAPI app
23
- CMD ["python", "edge_tts-api.py"]
 
 
1
  FROM python:3.9-slim
2
 
 
3
  WORKDIR /app
4
 
5
+ # Install system dependencies
6
  RUN apt-get update && apt-get install -y \
7
  wget \
8
  && rm -rf /var/lib/apt/lists/*
 
14
  # Install Python dependencies
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
+ # Create audio_files directory and set permissions
18
+ RUN mkdir -p /app/audio_files && chmod -R 777 /app/audio_files
19
+
20
  EXPOSE 7860
21
 
22
+ CMD ["uvicorn", "edge_tts-api:app", "--host", "0.0.0.0", "--port", "7860"]