File size: 1,315 Bytes
2d6afaa
 
 
 
 
 
2471025
2d6afaa
 
 
fd5e0f7
2471025
2d6afaa
 
 
 
 
 
 
 
 
2471025
 
2d6afaa
2471025
 
 
 
 
 
 
 
 
 
71eeb8d
2d6afaa
 
 
 
 
 
 
 
 
 
 
 
 
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
# Use an official Python runtime as a parent image
FROM python:3.10-slim

# Set the working directory in the container
WORKDIR /app

# Install system dependencies for Node.js installation, Git, and wkhtmltopdf (for PDF generation)
RUN apt-get update && apt-get install -y \
    curl \
    gnupg \
    git \
    wkhtmltopdf \
    && rm -rf /var/lib/apt/lists/*

# Add Node.js LTS repository and install Node.js and npm
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - \
    && apt-get install -y nodejs

# Install repomix globally using npm
RUN npm install -g repomix

# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python3 -

# Add Poetry to PATH
ENV PATH="/root/.local/bin:$PATH"

# Configure Poetry to not create virtual environments
RUN poetry config virtualenvs.create false

# Copy poetry.lock and pyproject.toml
COPY poetry.lock pyproject.toml /app/

# Install project dependencies using Poetry
RUN poetry install --no-root --no-interaction --no-ansi

# Copy the rest of the application code into the container
COPY . .

# Make port 7860 available to the world outside this container
EXPOSE 7860

# Define environment variable for Gradio server
ENV GRADIO_SERVER_NAME="0.0.0.0"
ENV GRADIO_SERVER_PORT="7860"

# Run app.py when the container launches
CMD ["python", "app.py"]