Spaces:
Configuration error
Configuration error
File size: 1,085 Bytes
2d610a5 a86d6f8 69f25fb a86d6f8 2d610a5 cab85eb 2d610a5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# Use Python 3.10.5 as the base image
FROM python:3.10.5-slim
# Set the working directory in the container
WORKDIR /app
# Update package list and upgrade packages
RUN apt-get update -y && apt-get upgrade -y
# Install necessary system packages
RUN apt-get install -y git mecab libmecab-dev mecab-ipadic mecab-ipadic-utf8 gcc llvm llvm-dev
# Upgrade pip
RUN pip install --upgrade pip
# Install PyTorch
# Note: Replace the next line with the correct command to install the PyTorch version compatible with your deepspeed version
RUN pip install torch
# Install other dependencies from requirements.txt
COPY requirements.txt /app/
RUN pip install --no-cache-dir -r requirements.txt
# List installed packages for debugging
RUN pip list
# Copy the rest of your application's code
COPY . /app/
# Set the environment variable for Coqui TTS
ENV COQUI_TOS_AGREED=1
# Install numba and llvmlite
RUN pip install numba==0.48 llvmlite
# Apply migrations
RUN python manage.py migrate
# Use Django's built-in server to serve the app
CMD ["python", "manage.py", "runserver", "0.0.0.0:7860"]
|