Update Dockerfile
Browse files- Dockerfile +1 -49
Dockerfile
CHANGED
@@ -1,52 +1,4 @@
|
|
1 |
-
# # Use a Python base image
|
2 |
-
# FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04
|
3 |
|
4 |
-
# # Set the working directory
|
5 |
-
# WORKDIR /DocQA
|
6 |
-
# # Install dependencies
|
7 |
-
# RUN apt-get update && apt-get install -y \
|
8 |
-
# git \
|
9 |
-
# python3.10 \
|
10 |
-
# python3-pip \
|
11 |
-
# && apt-get clean
|
12 |
-
|
13 |
-
|
14 |
-
# RUN apt-get install poppler-utils -y
|
15 |
-
|
16 |
-
|
17 |
-
# RUN pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
|
18 |
-
# RUN useradd -m -u 1000 user
|
19 |
-
|
20 |
-
# USER user
|
21 |
-
|
22 |
-
# ENV HOME=/home/user \
|
23 |
-
# PATH=/home/user/.local/bin:$PATH
|
24 |
-
|
25 |
-
# WORKDIR $HOME/app
|
26 |
-
# # Copy the requirements.txt file
|
27 |
-
# COPY --chown=user requirements.txt $HOME/app
|
28 |
-
|
29 |
-
# RUN pip install --no-cache-dir -r requirements.txt
|
30 |
-
|
31 |
-
# # Copy the rest of the application codeDocQA
|
32 |
-
# COPY --chown=user images $HOME/app
|
33 |
-
# COPY --chown=user app.py $HOME/app
|
34 |
-
# COPY --chown=user ./classification.py $HOME/app
|
35 |
-
# COPY --chown=user donut_inference.py $HOME/app
|
36 |
-
# COPY --chown=user non_form_llama_parse.py $HOME/app
|
37 |
-
# COPY --chown=user RAG.py $HOME/app
|
38 |
-
# COPY --chown=user best_resnet152_model.h5 $HOME/app
|
39 |
-
# COPY --chown=user Model $HOME/app
|
40 |
-
|
41 |
-
# # Expose the port the app runs on
|
42 |
-
# # EXPOSE 7860
|
43 |
-
# EXPOSE 8501
|
44 |
-
|
45 |
-
|
46 |
-
# # Start the application
|
47 |
-
# # CMD ["streamlit", "run", "app.py"]
|
48 |
-
# ENTRYPOINT ["streamlit", "run","app.py" ,"--server.enableXsrfProtection", "false"]
|
49 |
-
# Use a base image from NVIDIA that includes CUDA and cuDNN
|
50 |
FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04
|
51 |
|
52 |
# Set the working directory in the container
|
@@ -77,7 +29,7 @@ WORKDIR $HOME/app
|
|
77 |
# Copy the requirements.txt first to leverage Docker cache
|
78 |
COPY --chown=user requirements.txt $HOME/app/
|
79 |
RUN pip install --no-cache-dir -r requirements.txt
|
80 |
-
RUN pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
|
81 |
|
82 |
# Copy the rest of the application's code to the container
|
83 |
COPY --chown=user . $HOME/app
|
|
|
|
|
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
FROM nvidia/cuda:12.4.1-runtime-ubuntu22.04
|
3 |
|
4 |
# Set the working directory in the container
|
|
|
29 |
# Copy the requirements.txt first to leverage Docker cache
|
30 |
COPY --chown=user requirements.txt $HOME/app/
|
31 |
RUN pip install --no-cache-dir -r requirements.txt
|
32 |
+
# RUN pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu113
|
33 |
|
34 |
# Copy the rest of the application's code to the container
|
35 |
COPY --chown=user . $HOME/app
|