acharyaaditya26 commited on
Commit
724e400
·
1 Parent(s): b133312
Files changed (1) hide show
  1. Dockerfile +4 -7
Dockerfile CHANGED
@@ -1,7 +1,5 @@
1
- # Read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
- # you will also find guides on how best to write your Dockerfile
3
-
4
- FROM nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04
5
 
6
  RUN apt-get update && apt-get upgrade -y
7
  RUN apt-get install -y python3-pip python3-dev
@@ -20,12 +18,11 @@ WORKDIR /app
20
  COPY --chown=user ./requirements.txt requirements.txt
21
 
22
  # Install torch first
23
- RUN pip install --no-cache-dir torch==2.1.2
24
 
25
  # Now install the rest of the packages
26
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
27
  RUN pip install flash_attn
28
 
29
  COPY --chown=user . /app
30
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
31
-
 
1
+ # Use a base image that includes the CUDA toolkit
2
+ FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04
 
 
3
 
4
  RUN apt-get update && apt-get upgrade -y
5
  RUN apt-get install -y python3-pip python3-dev
 
18
  COPY --chown=user ./requirements.txt requirements.txt
19
 
20
  # Install torch first
21
+ # RUN pip install --no-cache-dir torch==2.1.2
22
 
23
  # Now install the rest of the packages
24
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
25
  RUN pip install flash_attn
26
 
27
  COPY --chown=user . /app
28
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]