Skip to content

Commit 8523c30

Browse files
committed
Added the Dockerfile for the GraphGen
1 parent 3836ad4 commit 8523c30

1 file changed

Lines changed: 43 additions & 0 deletions

File tree

Dockerfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Use a slim version of Python 3.10 as the base image
2+
FROM python:3.10-slim
3+
4+
# Environment variables to prevent Python from writing .pyc files
5+
# and to ensure output is logged directly
6+
ENV PYTHONDONTWRITEBYTECODE=1
7+
ENV PYTHONUNBUFFERED=1
8+
9+
# Set the working directory inside the container
10+
WORKDIR /app
11+
12+
# Install system dependencies required for building Python packages
13+
RUN apt-get update && \
14+
apt-get install -y --no-install-recommends \
15+
git \
16+
build-essential && \
17+
apt-get clean && \
18+
rm -rf /var/lib/apt/lists/*
19+
20+
# Copy requirements file and install Python dependencies
21+
COPY requirements.txt .
22+
RUN pip install --upgrade pip && \
23+
pip install --no-cache-dir -r requirements.txt
24+
25+
# Copy the rest of the application code into the container
26+
COPY . .
27+
28+
# Create necessary directories
29+
RUN mkdir -p cache/data/graphgen cache/logs
30+
31+
# Environment variables for application config
32+
ENV SYNTHESIZER_MODEL=""
33+
ENV SYNTHESIZER_BASE_URL=""
34+
ENV SYNTHESIZER_API_KEY=""
35+
ENV TRAINEE_MODEL=""
36+
ENV TRAINEE_BASE_URL=""
37+
ENV TRAINEE_API_KEY=""
38+
39+
# Expose the port the app will run on
40+
EXPOSE 7860
41+
42+
# Command to run the application
43+
CMD ["python", "webui/app.py"]

0 commit comments

Comments
 (0)