From 05f7444ecd2e3405b0e595042166ec5f8a3395ab Mon Sep 17 00:00:00 2001 From: diogo464 Date: Wed, 28 May 2025 20:46:55 +0100 Subject: init --- Containerfile | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 Containerfile (limited to 'Containerfile') diff --git a/Containerfile b/Containerfile new file mode 100644 index 0000000..c8ff201 --- /dev/null +++ b/Containerfile @@ -0,0 +1,37 @@ +FROM python:3.9-slim + +# Set working directory +WORKDIR /app + +# Install system dependencies +RUN apt-get update && apt-get install -y \ + git \ + && rm -rf /var/lib/apt/lists/* + +# Copy requirements and install Python dependencies +COPY requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +# === BONSAI SETUP SECTION === +WORKDIR /usr/src/bonsai +RUN git clone https://codelab.fct.unl.pt/di/computer-systems/bonsai . && \ + pip install --no-cache-dir 'torch~=2.0.1' && \ + pip install --no-cache-dir -r requirements.txt +# === END BONSAI SETUP SECTION === + +# Copy application files +COPY app.py . +COPY index.html . +COPY script.js . +COPY logo.png . + +# Expose the port +EXPOSE 5000 + +# Set environment variables +ENV FLASK_APP=app.py +ENV FLASK_ENV=production +ENV BONSAI_TEST_MODE=false + +# Run the application +CMD ["python", "app.py"] \ No newline at end of file -- cgit