forked from ParisNeo/lollms-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
46 lines (36 loc) · 1.22 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Use an official Python runtime as a parent image
FROM python:3.11-slim
# Set the working directory in the container
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Miniconda
RUN curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh \
&& bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda \
&& rm Miniconda3-latest-Linux-x86_64.sh
# Add Conda to PATH
ENV PATH /opt/conda/bin:$PATH
# Create and activate Conda environment
RUN conda create --name lollms_env python=3.11 git pip -y
SHELL ["conda", "run", "-n", "lollms_env", "/bin/bash", "-c"]
# Clone the repository
RUN git clone --depth 1 --recurse-submodules https://github.com/ParisNeo/lollms-webui.git \
&& cd lollms-webui/lollms_core \
&& pip install -e . \
&& cd ../.. \
&& cd lollms-webui/utilities/pipmaster \
&& pip install -e . \
&& cd ../..
# Install project dependencies
WORKDIR /app/lollms-webui
COPY requirements.txt .
RUN pip install -r requirements.txt
# Copy the rest of the application code
COPY . .
# Expose port 9600
EXPOSE 9600
# Set the default command to run the application
CMD ["python", "app.py"]