Spaces:
Configuration error
Configuration error
fix build
Browse files- Dockerfile +5 -40
Dockerfile
CHANGED
|
@@ -4,15 +4,14 @@ FROM python:3.10.5-slim
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Upgrade pip, install git, MeCab and
|
| 8 |
RUN apt-get update \
|
| 9 |
-
&& apt-get install -y git mecab libmecab-dev mecab-ipadic mecab-ipadic-utf8 \
|
| 10 |
&& pip install --upgrade pip
|
| 11 |
|
| 12 |
# Install PyTorch
|
| 13 |
# Note: Replace the next line with the correct command to install the PyTorch version compatible with your deepspeed version
|
| 14 |
RUN pip install torch
|
| 15 |
-
RUN pip install librosa -U
|
| 16 |
|
| 17 |
# Install other dependencies from requirements.txt
|
| 18 |
COPY requirements.txt /app/
|
|
@@ -24,48 +23,14 @@ RUN pip list
|
|
| 24 |
# Copy the rest of your application's code
|
| 25 |
COPY . /app/
|
| 26 |
|
| 27 |
-
# RUN cd /tmp && mkdir cache1
|
| 28 |
-
|
| 29 |
-
ENV NUMBA_CACHE_DIR=/tmp
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
# Expose the port your app runs on
|
| 33 |
-
EXPOSE 7860
|
| 34 |
-
|
| 35 |
-
# Download UniDic for MeCab
|
| 36 |
-
RUN pip install unidic \
|
| 37 |
-
&& python -m unidic download
|
| 38 |
-
|
| 39 |
# Set the environment variable for Coqui TTS
|
| 40 |
ENV COQUI_TOS_AGREED=1
|
| 41 |
-
|
|
|
|
|
|
|
| 42 |
|
| 43 |
# Apply migrations
|
| 44 |
RUN python manage.py migrate
|
| 45 |
|
| 46 |
# Use Django's built-in server to serve the app
|
| 47 |
CMD ["python", "manage.py", "runserver", "0.0.0.0:7860"]
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
# # Fast api
|
| 52 |
-
# # Use the official Python image as a parent image
|
| 53 |
-
# FROM python:3.10.5-slim
|
| 54 |
-
|
| 55 |
-
# # Set the working directory in the container
|
| 56 |
-
# WORKDIR /app
|
| 57 |
-
|
| 58 |
-
# # Copy the requirements file into the container at /app
|
| 59 |
-
# COPY requirements.txt .
|
| 60 |
-
|
| 61 |
-
# # Install any needed packages specified in requirements.txt
|
| 62 |
-
# RUN pip install -r requirements.txt
|
| 63 |
-
|
| 64 |
-
# # Copy the current directory contents into the container at /app
|
| 65 |
-
# COPY . .
|
| 66 |
-
|
| 67 |
-
# # Expose port 7860 to the outside world
|
| 68 |
-
# EXPOSE 7860
|
| 69 |
-
|
| 70 |
-
# # Define the command to run your FastAPI application using uvicorn
|
| 71 |
-
# CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Upgrade pip, install git, MeCab, and their dependencies
|
| 8 |
RUN apt-get update \
|
| 9 |
+
&& apt-get install -y git mecab libmecab-dev mecab-ipadic mecab-ipadic-utf8 gcc \
|
| 10 |
&& pip install --upgrade pip
|
| 11 |
|
| 12 |
# Install PyTorch
|
| 13 |
# Note: Replace the next line with the correct command to install the PyTorch version compatible with your deepspeed version
|
| 14 |
RUN pip install torch
|
|
|
|
| 15 |
|
| 16 |
# Install other dependencies from requirements.txt
|
| 17 |
COPY requirements.txt /app/
|
|
|
|
| 23 |
# Copy the rest of your application's code
|
| 24 |
COPY . /app/
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
# Set the environment variable for Coqui TTS
|
| 27 |
ENV COQUI_TOS_AGREED=1
|
| 28 |
+
|
| 29 |
+
# Install numba and llvmlite
|
| 30 |
+
RUN pip install numba==0.48 llvmlite
|
| 31 |
|
| 32 |
# Apply migrations
|
| 33 |
RUN python manage.py migrate
|
| 34 |
|
| 35 |
# Use Django's built-in server to serve the app
|
| 36 |
CMD ["python", "manage.py", "runserver", "0.0.0.0:7860"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|