aboutsummaryrefslogtreecommitdiff
path: root/Containerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Containerfile')
-rw-r--r--Containerfile37
1 files changed, 37 insertions, 0 deletions
diff --git a/Containerfile b/Containerfile
new file mode 100644
index 0000000..c8ff201
--- /dev/null
+++ b/Containerfile
@@ -0,0 +1,37 @@
1FROM python:3.9-slim
2
3# Set working directory
4WORKDIR /app
5
6# Install system dependencies
7RUN apt-get update && apt-get install -y \
8 git \
9 && rm -rf /var/lib/apt/lists/*
10
11# Copy requirements and install Python dependencies
12COPY requirements.txt .
13RUN pip install --no-cache-dir -r requirements.txt
14
15# === BONSAI SETUP SECTION ===
16WORKDIR /usr/src/bonsai
17RUN git clone https://codelab.fct.unl.pt/di/computer-systems/bonsai . && \
18 pip install --no-cache-dir 'torch~=2.0.1' && \
19 pip install --no-cache-dir -r requirements.txt
20# === END BONSAI SETUP SECTION ===
21
22# Copy application files
23COPY app.py .
24COPY index.html .
25COPY script.js .
26COPY logo.png .
27
28# Expose the port
29EXPOSE 5000
30
31# Set environment variables
32ENV FLASK_APP=app.py
33ENV FLASK_ENV=production
34ENV BONSAI_TEST_MODE=false
35
36# Run the application
37CMD ["python", "app.py"] \ No newline at end of file