Spaces:
Runtime error
Runtime error
Darshan
commited on
Commit
·
c149546
1
Parent(s):
6b67c84
add api
Browse files- Dockerfile +7 -8
- requirements.txt +2 -1
Dockerfile
CHANGED
|
@@ -3,27 +3,26 @@ FROM python:3.9-slim
|
|
| 3 |
|
| 4 |
# Install system dependencies
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
-
git ffmpeg wget && \
|
| 7 |
rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
# Set working directory
|
| 10 |
WORKDIR /app
|
| 11 |
|
| 12 |
-
# Copy requirements and install dependencies
|
| 13 |
-
COPY requirements.txt .
|
| 14 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 15 |
-
|
| 16 |
# Clone NeMo from the specific branch and install it
|
| 17 |
RUN git clone https://github.com/AI4Bharat/NeMo.git && \
|
| 18 |
cd NeMo && \
|
| 19 |
git checkout nemo-v2 && \
|
| 20 |
bash reinstall.sh
|
| 21 |
|
| 22 |
-
# Copy
|
| 23 |
COPY . .
|
| 24 |
|
| 25 |
-
#
|
|
|
|
|
|
|
|
|
|
| 26 |
EXPOSE 7860
|
| 27 |
|
| 28 |
-
#
|
| 29 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 3 |
|
| 4 |
# Install system dependencies
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
+
git ffmpeg wget bash && \
|
| 7 |
rm -rf /var/lib/apt/lists/*
|
| 8 |
|
| 9 |
# Set working directory
|
| 10 |
WORKDIR /app
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
# Clone NeMo from the specific branch and install it
|
| 13 |
RUN git clone https://github.com/AI4Bharat/NeMo.git && \
|
| 14 |
cd NeMo && \
|
| 15 |
git checkout nemo-v2 && \
|
| 16 |
bash reinstall.sh
|
| 17 |
|
| 18 |
+
# Copy the application code into the container
|
| 19 |
COPY . .
|
| 20 |
|
| 21 |
+
# Install remaining Python dependencies
|
| 22 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
+
|
| 24 |
+
# Expose the application port
|
| 25 |
EXPOSE 7860
|
| 26 |
|
| 27 |
+
# Start the FastAPI app with Uvicorn
|
| 28 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
requirements.txt
CHANGED
|
@@ -5,4 +5,5 @@ ffmpeg-python
|
|
| 5 |
packaging
|
| 6 |
huggingface_hub==0.23.2
|
| 7 |
soundfile
|
| 8 |
-
numpy
|
|
|
|
|
|
| 5 |
packaging
|
| 6 |
huggingface_hub==0.23.2
|
| 7 |
soundfile
|
| 8 |
+
numpy
|
| 9 |
+
setuptools
|