Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +8 -8
Dockerfile
CHANGED
@@ -4,33 +4,33 @@ FROM python:3.9
|
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
-
# Copy code and scripts
|
8 |
COPY . .
|
9 |
|
10 |
-
# Install pip and upgrade
|
11 |
RUN pip install --upgrade pip
|
12 |
|
13 |
-
# Install core dependencies
|
14 |
RUN pip install packaging torch --extra-index-url https://download.pytorch.org/whl/cu118
|
15 |
|
16 |
-
# Install additional dependencies
|
17 |
RUN pip install \
|
18 |
nltk sacremoses pandas regex mock \
|
19 |
"transformers>=4.33.2" mosestokenizer \
|
20 |
bitsandbytes scipy accelerate datasets \
|
21 |
-
sentencepiece
|
22 |
|
23 |
# Download NLTK punkt tokenizer
|
24 |
RUN python3 -c "import nltk; nltk.download('punkt')"
|
25 |
|
26 |
-
#
|
27 |
RUN git clone https://github.com/VarunGumma/IndicTransToolkit && \
|
28 |
cd IndicTransToolkit && \
|
29 |
pip install --editable ./ && \
|
30 |
cd ..
|
31 |
|
32 |
-
# Expose port 7860
|
33 |
EXPOSE 7860
|
34 |
|
35 |
-
# Start FastAPI
|
36 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
4 |
# Set the working directory
|
5 |
WORKDIR /app
|
6 |
|
7 |
+
# Copy your FastAPI code and setup scripts
|
8 |
COPY . .
|
9 |
|
10 |
+
# Install pip and upgrade it
|
11 |
RUN pip install --upgrade pip
|
12 |
|
13 |
+
# Install core dependencies including Uvicorn
|
14 |
RUN pip install packaging torch --extra-index-url https://download.pytorch.org/whl/cu118
|
15 |
|
16 |
+
# Install additional dependencies including Uvicorn
|
17 |
RUN pip install \
|
18 |
nltk sacremoses pandas regex mock \
|
19 |
"transformers>=4.33.2" mosestokenizer \
|
20 |
bitsandbytes scipy accelerate datasets \
|
21 |
+
sentencepiece uvicorn
|
22 |
|
23 |
# Download NLTK punkt tokenizer
|
24 |
RUN python3 -c "import nltk; nltk.download('punkt')"
|
25 |
|
26 |
+
# Clone and install IndicTrans2 toolkit
|
27 |
RUN git clone https://github.com/VarunGumma/IndicTransToolkit && \
|
28 |
cd IndicTransToolkit && \
|
29 |
pip install --editable ./ && \
|
30 |
cd ..
|
31 |
|
32 |
+
# Expose port 7860 for FastAPI (or change if needed)
|
33 |
EXPOSE 7860
|
34 |
|
35 |
+
# Start the FastAPI app
|
36 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|