-
Notifications
You must be signed in to change notification settings - Fork 112
/
Copy pathDockerfile
53 lines (39 loc) · 1.18 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
47
48
49
50
51
52
53
# Use an official Python runtime as a parent image
FROM python:3.12.3-slim
# Install required system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
libjpeg-dev \
libmagic-dev \
zlib1g-dev \
libopenjp2-7-dev \
libpng-dev \
libpoppler-cpp-dev \
pkg-config \
gcc \
git \
libqpdf-dev \
libgl1-mesa-glx \
libglib2.0-0 \
&& rm -rf /var/lib/apt/lists/*
# Set the working directory in the container
WORKDIR /ragbuilder
# Copy the current directory contents into the container at /ragbuilder
COPY . /ragbuilder
# Install pip and upgrade setuptools and wheel
RUN pip install --upgrade pip setuptools wheel
# RUN pip install --use-pep517 -r requirements.txt
# RUN python3 -m build
RUN pip install dist/*.gz
# Delete all files in the current directory
WORKDIR /
# Optionally, you can delete hidden files and directories as well
RUN rm -rf /ragbuilder/*
WORKDIR /ragbuilder
COPY LICENSE /ragbuilder/LICENSE
COPY .env-Sample /ragbuilder/.env-Sample
COPY README.md /ragbuilder/README.md
# Make port 80 available to the world outside this container
EXPOSE 8005
# Run app.py when the container launches
CMD ["ragbuilder"]