darshankr commited on
Commit
904f836
·
verified ·
1 Parent(s): fe0eaf5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -12
Dockerfile CHANGED
@@ -4,36 +4,33 @@ FROM python:3.9
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 the 'packaging' library first
14
- RUN pip install packaging
15
 
16
- # Install PyTorch with CUDA support
17
- RUN pip install torch --extra-index-url https://download.pytorch.org/whl/cu118
18
-
19
- # Install all other dependencies (re-ordered)
20
  RUN pip install \
21
  nltk sacremoses pandas regex mock \
22
  "transformers>=4.33.2" mosestokenizer \
23
  bitsandbytes scipy accelerate datasets \
24
- sentencepiece "flash-attn>=2.1"
25
 
26
  # Download NLTK punkt tokenizer
27
  RUN python3 -c "import nltk; nltk.download('punkt')"
28
 
29
- # Clone and install IndicTrans2 toolkit
30
  RUN git clone https://github.com/VarunGumma/IndicTransToolkit && \
31
  cd IndicTransToolkit && \
32
  pip install --editable ./ && \
33
  cd ..
34
 
35
- # Expose port 7860 for FastAPI (or change if needed)
36
  EXPOSE 7860
37
 
38
- # Start the FastAPI app
39
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
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 without `flash-attn`
 
 
 
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
+ # 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
33
  EXPOSE 7860
34
 
35
+ # Start FastAPI server
36
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]