Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin Page/Dockerize/Model configration #6

Merged
merged 2 commits into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Binary file modified .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules/
.venv/
.idea
stand_by_docker-compose.txt
46 changes: 46 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM python:3.11-slim-bullseye

LABEL authors="viktorngo"
RUN apt-get update -y && apt-get upgrade -y && apt-get dist-upgrade -y
RUN apt-get install -y wget curl
RUN wget https://r.mariadb.com/downloads/mariadb_repo_setup
RUN chmod +x mariadb_repo_setup
RUN ./mariadb_repo_setup --mariadb-server-version="mariadb-10.6"
# Update the package index and install dependencies
RUN apt-get install -y \
apt-transport-https \
build-essential \
gcc \
libmariadb3 \
libmariadb-dev \
libffi-dev \
liblapack-dev \
libopenblas-dev \
default-libmysqlclient-dev \
pkg-config \
cmake \
mariadb-server \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Set the working directory
WORKDIR /app

# Copy the requirements file first for Docker caching
COPY requirements.txt .

# Install Python dependencies
RUN pip install --default-timeout=100 --no-cache-dir -r requirements.txt

# Copy the entire application code
COPY . .

# Copy the startup script and make it executable
COPY startup.sh .
RUN chmod +x startup.sh

# Expose the port your application will run on
EXPOSE 8080

# Specify the command to run on container start
CMD ["./startup.sh"]
272 changes: 0 additions & 272 deletions database/fyp.sql

This file was deleted.

Loading