Spaces:
Sleeping
Sleeping
Commit
·
e18f702
1
Parent(s):
d53004d
Modified for Hugging Face deployment
Browse files- Dockerfile +9 -23
- Procfile +1 -1
- requirements.txt +6 -1
Dockerfile
CHANGED
@@ -1,34 +1,20 @@
|
|
1 |
-
# Use
|
2 |
-
FROM python:3.10
|
3 |
-
|
4 |
-
# Install OS dependencies for Pillow and others
|
5 |
-
RUN apt-get update && apt-get install -y \
|
6 |
-
build-essential \
|
7 |
-
libjpeg-dev \
|
8 |
-
zlib1g-dev \
|
9 |
-
libpng-dev \
|
10 |
-
libfreetype6-dev \
|
11 |
-
&& rm -rf /var/lib/apt/lists/*
|
12 |
|
13 |
# Set working directory
|
14 |
WORKDIR /app
|
15 |
|
16 |
-
# Copy
|
17 |
-
COPY requirements.txt
|
18 |
|
19 |
-
# Install
|
20 |
RUN pip install --no-cache-dir -r requirements.txt
|
21 |
|
22 |
-
# Copy
|
23 |
-
COPY .
|
24 |
|
25 |
-
# Expose
|
26 |
EXPOSE 8000
|
27 |
|
28 |
-
#
|
29 |
-
RUN echo '#!/bin/bash\n\
|
30 |
-
export PORT=${PORT:-8000}\n\
|
31 |
-
streamlit run app.py --server.port=$PORT --server.address=0.0.0.0' > /start.sh && chmod +x /start.sh
|
32 |
-
|
33 |
-
# Run the script
|
34 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
1 |
+
# Use lightweight Python
|
2 |
+
FROM python:3.10-slim
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
# Set working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Copy requirements first for caching
|
8 |
+
COPY requirements.txt .
|
9 |
|
10 |
+
# Install dependencies
|
11 |
RUN pip install --no-cache-dir -r requirements.txt
|
12 |
|
13 |
+
# Copy project files
|
14 |
+
COPY . .
|
15 |
|
16 |
+
# Expose FastAPI port
|
17 |
EXPOSE 8000
|
18 |
|
19 |
+
# Run FastAPI with uvicorn
|
|
|
|
|
|
|
|
|
|
|
20 |
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
Procfile
CHANGED
@@ -1 +1 @@
|
|
1 |
-
web:
|
|
|
1 |
+
web: uvicorn app.main:app --host 0.0.0.0 --port 10000
|
requirements.txt
CHANGED
@@ -9,9 +9,14 @@ moviepy==1.0.3
|
|
9 |
srt
|
10 |
fastapi
|
11 |
uvicorn
|
12 |
-
|
|
|
|
|
|
|
13 |
# Required moviepy dependencies
|
14 |
imageio
|
15 |
imageio-ffmpeg
|
16 |
decorator
|
17 |
tqdm
|
|
|
|
|
|
9 |
srt
|
10 |
fastapi
|
11 |
uvicorn
|
12 |
+
gtts
|
13 |
+
pydantic
|
14 |
+
mutagen
|
15 |
+
requests
|
16 |
# Required moviepy dependencies
|
17 |
imageio
|
18 |
imageio-ffmpeg
|
19 |
decorator
|
20 |
tqdm
|
21 |
+
python-multipart
|
22 |
+
opencv-python-headless
|