Spaces:
Configuration error
Configuration error
update
Browse files- Dockerfile +16 -10
Dockerfile
CHANGED
|
@@ -4,14 +4,10 @@ FROM python:3.10.13-slim
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
#
|
| 8 |
-
RUN apt-get update
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
RUN apt-get install -y git mecab libmecab-dev mecab-ipadic mecab-ipadic-utf8 gcc llvm llvm-dev
|
| 12 |
-
|
| 13 |
-
# Upgrade pip
|
| 14 |
-
RUN pip install --upgrade pip
|
| 15 |
|
| 16 |
# Install PyTorch
|
| 17 |
# Note: Replace the next line with the correct command to install the PyTorch version compatible with your deepspeed version
|
|
@@ -27,10 +23,20 @@ RUN pip list
|
|
| 27 |
# Copy the rest of your application's code
|
| 28 |
COPY . /app/
|
| 29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
# Set the environment variable for Coqui TTS
|
| 31 |
ENV COQUI_TOS_AGREED=1
|
| 32 |
-
RUN pip install numba==0.58.0
|
| 33 |
-
|
| 34 |
|
| 35 |
# Apply migrations
|
| 36 |
RUN python manage.py migrate
|
|
|
|
| 4 |
# Set the working directory in the container
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Upgrade pip, install git, MeCab and its dependencies
|
| 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
|
|
|
|
| 23 |
# Copy the rest of your application's code
|
| 24 |
COPY . /app/
|
| 25 |
|
| 26 |
+
# RUN cd /tmp && mkdir cache1
|
| 27 |
+
|
| 28 |
+
ENV NUMBA_CACHE_DIR=/tmp
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
# Expose the port your app runs on
|
| 32 |
+
EXPOSE 7860
|
| 33 |
+
|
| 34 |
+
# Download UniDic for MeCab
|
| 35 |
+
RUN pip install unidic \
|
| 36 |
+
&& python -m unidic download
|
| 37 |
+
|
| 38 |
# Set the environment variable for Coqui TTS
|
| 39 |
ENV COQUI_TOS_AGREED=1
|
|
|
|
|
|
|
| 40 |
|
| 41 |
# Apply migrations
|
| 42 |
RUN python manage.py migrate
|