Commit
·
5ee238d
1
Parent(s):
bc036d8
updated docker
Browse files- Dockerfile +4 -13
Dockerfile
CHANGED
@@ -1,45 +1,36 @@
|
|
1 |
-
# Use NVIDIA CUDA base image
|
2 |
FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04
|
3 |
|
4 |
-
# Install system dependencies for Python and Poetry
|
5 |
RUN apt-get update && apt-get install -y \
|
6 |
-
python3 python3-pip python3-venv build-essential curl git \
|
7 |
&& rm -rf /var/lib/apt/lists/*
|
8 |
|
9 |
-
# Install Poetry globally
|
10 |
RUN pip install --no-cache-dir --upgrade pip \
|
11 |
&& pip install --no-cache-dir poetry
|
12 |
|
13 |
-
# Set environment variables for Poetry and Python
|
14 |
ENV POETRY_VIRTUALENVS_CREATE=false \
|
15 |
POETRY_CACHE_DIR=/root/.cache/pypoetry \
|
16 |
PATH="/root/.local/bin:$PATH"
|
17 |
|
18 |
-
# Set the working directory
|
19 |
WORKDIR /app
|
20 |
|
21 |
-
# Copy Poetry configuration files
|
22 |
COPY pyproject.toml ./
|
23 |
|
24 |
-
|
25 |
-
|
|
|
26 |
&& pip install --no-build-isolation flash-attn \
|
27 |
&& pip install "rerankers[all]"
|
28 |
|
29 |
-
RUN pip install weasyprint
|
30 |
-
|
31 |
RUN useradd -m -u 1000 user
|
32 |
USER user
|
33 |
ENV HOME /home/user
|
34 |
ENV PATH $HOME/.local/bin:$PATH
|
35 |
|
36 |
-
# Copy the rest of the application
|
37 |
WORKDIR $HOME
|
38 |
RUN mkdir app
|
39 |
WORKDIR $HOME/app
|
40 |
COPY . $HOME/app
|
41 |
|
42 |
-
|
43 |
EXPOSE 7860
|
44 |
|
45 |
CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=7860"]
|
|
|
|
|
1 |
FROM nvidia/cuda:12.3.2-cudnn9-devel-ubuntu22.04
|
2 |
|
|
|
3 |
RUN apt-get update && apt-get install -y \
|
4 |
+
python3 python3-pip python3-venv build-essential curl git libvips-dev \
|
5 |
&& rm -rf /var/lib/apt/lists/*
|
6 |
|
|
|
7 |
RUN pip install --no-cache-dir --upgrade pip \
|
8 |
&& pip install --no-cache-dir poetry
|
9 |
|
|
|
10 |
ENV POETRY_VIRTUALENVS_CREATE=false \
|
11 |
POETRY_CACHE_DIR=/root/.cache/pypoetry \
|
12 |
PATH="/root/.local/bin:$PATH"
|
13 |
|
|
|
14 |
WORKDIR /app
|
15 |
|
|
|
16 |
COPY pyproject.toml ./
|
17 |
|
18 |
+
RUN apt-get update && apt-get install -y \
|
19 |
+
weasyprint \
|
20 |
+
&& poetry install --no-interaction --no-ansi \
|
21 |
&& pip install --no-build-isolation flash-attn \
|
22 |
&& pip install "rerankers[all]"
|
23 |
|
|
|
|
|
24 |
RUN useradd -m -u 1000 user
|
25 |
USER user
|
26 |
ENV HOME /home/user
|
27 |
ENV PATH $HOME/.local/bin:$PATH
|
28 |
|
|
|
29 |
WORKDIR $HOME
|
30 |
RUN mkdir app
|
31 |
WORKDIR $HOME/app
|
32 |
COPY . $HOME/app
|
33 |
|
|
|
34 |
EXPOSE 7860
|
35 |
|
36 |
CMD ["streamlit", "run", "app.py", "--server.address=0.0.0.0", "--server.port=7860"]
|