Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
149 commits
Select commit Hold shift + click to select a range
17ca06b
Merge pull request #40 from SatwikReddySripathi/main_model
DhanushAkula Nov 15, 2024
8a0a639
Delete Dockerfilemodel
DhanushAkula Nov 27, 2024
21b3810
Delete .github/workflows/model_pipeline.yaml
DhanushAkula Nov 27, 2024
42ab219
Create model_pipeline.yml
DhanushAkula Nov 27, 2024
41e8571
Add files via upload
DhanushAkula Nov 27, 2024
70ff35e
Add files via upload
DhanushAkula Nov 27, 2024
2d206bf
Rename Dockerfilemodel.txt to Dockerfilemodel
DhanushAkula Nov 27, 2024
b4bd07d
Update Dockerfilemodel
DhanushAkula Nov 27, 2024
e18c7da
Update model_requirements.txt
DhanushAkula Nov 27, 2024
f258635
Create test_run.py
DhanushAkula Nov 27, 2024
35eb1d8
Update model_pipeline.yml
DhanushAkula Nov 27, 2024
2e4515d
Update Dockerfilemodel
DhanushAkula Nov 27, 2024
b094075
Update Dockerfilemodel
DhanushAkula Nov 27, 2024
ec88692
Update Dockerfilemodel
DhanushAkula Nov 27, 2024
98e6dc9
Update model_pipeline.yml
DhanushAkula Nov 27, 2024
f727ce1
Update test_run.py
DhanushAkula Nov 27, 2024
13e39a3
Update model_pipeline.yml
DhanushAkula Nov 30, 2024
8936861
Update model_pipeline.yml
DhanushAkula Nov 30, 2024
bf746d5
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
8ea3b56
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
65a4cba
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
1d7066f
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
80668d7
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
2e6ede1
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
7aee738
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
d2864df
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
4d3534b
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
31e1039
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
4114a7e
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
455b552
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
c435100
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
6d9e2d3
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
5a12a4c
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
5da46c6
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
7f3b073
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
185e1eb
Update model_pipeline.yml
DhanushAkula Dec 1, 2024
acc7cf1
Update model_pipeline.yml
DhanushAkula Dec 2, 2024
cf64027
Update model_pipeline.yml
DhanushAkula Dec 2, 2024
504ec33
Merge branch 'satwik_model' into dhanush_model
SatwikReddySripathi Dec 3, 2024
a7689a0
Delete .github/workflows/model_pipeline.yaml
DhanushAkula Dec 3, 2024
8b3f7d1
Rename model_pipeline.yml to model_pipeline.yaml
DhanushAkula Dec 4, 2024
5d78aab
Revert "Update model_pipeline.yml"
SatwikReddySripathi Dec 4, 2024
0555e97
Merge branch 'dhanush_model' of https://github.com/SatwikReddySripath…
SatwikReddySripathi Dec 4, 2024
70e8415
Update model_pipeline.yaml
SatwikReddySripathi Dec 4, 2024
f03693a
Create app.py
SatwikReddySripathi Dec 4, 2024
8d6445c
Create deploy_streamlit.py
SatwikReddySripathi Dec 4, 2024
be75366
Create custom_resnet.py
SatwikReddySripathi Dec 4, 2024
19eb834
Create disease_details_page.py
SatwikReddySripathi Dec 4, 2024
c9c227b
Create main_page.py
SatwikReddySripathi Dec 4, 2024
a3f34a5
Create page.py
SatwikReddySripathi Dec 4, 2024
ef000cd
Update model_pipeline.yaml
SatwikReddySripathi Dec 4, 2024
d15e386
Update requirements.txt
SatwikReddySripathi Dec 4, 2024
c78b065
Update deploy_streamlit.py
SatwikReddySripathi Dec 4, 2024
3fb7456
Update requirements.txt
SatwikReddySripathi Dec 4, 2024
94c549c
Update model_pipeline.yaml
SatwikReddySripathi Dec 4, 2024
db2e672
Update model_pipeline.yaml
SatwikReddySripathi Dec 4, 2024
2c3f9ae
Update model_pipeline.yaml
SatwikReddySripathi Dec 4, 2024
7ff2d1f
Update model_pipeline.yaml
SatwikReddySripathi Dec 4, 2024
f034ac1
Update model_pipeline.yaml
SatwikReddySripathi Dec 4, 2024
a7a69c0
Update model_pipeline.yaml
vamsijilla Dec 4, 2024
9709c0a
Create stream.yaml
vamsijilla Dec 4, 2024
82b3713
Update model_pipeline.yaml
vamsijilla Dec 4, 2024
be6d63b
Update stream.yaml
vamsijilla Dec 4, 2024
b92e6a0
Update Dockerfilemodel
vamsijilla Dec 4, 2024
b8d3a47
Update model_requirements.txt
vamsijilla Dec 4, 2024
7311abd
Update stream.yaml
vamsijilla Dec 4, 2024
d516c36
Update stream.yaml
vamsijilla Dec 4, 2024
90ea816
Update Dockerfilemodel
vamsijilla Dec 4, 2024
fe1b352
Update stream.yaml
vamsijilla Dec 4, 2024
fc3bd26
Update stream.yaml
vamsijilla Dec 4, 2024
80e9935
Update Dockerfilemodel
vamsijilla Dec 4, 2024
36841a8
Update Dockerfilemodel
vamsijilla Dec 4, 2024
521b6df
Update stream.yaml
vamsijilla Dec 4, 2024
2acf82e
Update stream.yaml
vamsijilla Dec 4, 2024
e38ed4d
Add files via upload
DhanushAkula Dec 4, 2024
f857749
Update stream.yaml
vamsijilla Dec 4, 2024
a1877b8
Update stream.yaml
vamsijilla Dec 4, 2024
05cddf4
Update stream.yaml
vamsijilla Dec 4, 2024
b57a783
Update stream.yaml
vamsijilla Dec 4, 2024
4c296e0
Update stream.yaml
vamsijilla Dec 4, 2024
b8db69c
Update stream.yaml
vamsijilla Dec 4, 2024
d4fce5c
Update requirements.txt
SatwikReddySripathi Dec 4, 2024
1a917bd
Create client_secret.json
SatwikReddySripathi Dec 4, 2024
203bb66
Update deploy_streamlit.py
SatwikReddySripathi Dec 4, 2024
149fe42
Merge branch 'dhanush_model' of https://github.com/SatwikReddySripath…
SatwikReddySripathi Dec 4, 2024
6a82248
Update stream.yaml
vamsijilla Dec 4, 2024
c7430dd
Update stream.yaml
vamsijilla Dec 4, 2024
a1978c9
Update Dockerfilemodel
vamsijilla Dec 4, 2024
4556e61
Merge branch 'dhanush_model' of https://github.com/SatwikReddySripath…
SatwikReddySripathi Dec 4, 2024
d17dabd
Update client_secret.json
SatwikReddySripathi Dec 4, 2024
f8867c2
Delete client_secret.json
SatwikReddySripathi Dec 4, 2024
ef085e8
Update Dockerfilemodel
vamsijilla Dec 4, 2024
9cbdf37
Update deploy_streamlit.py
SatwikReddySripathi Dec 4, 2024
2a29fba
Update Dockerfilemodel
SatwikReddySripathi Dec 4, 2024
5d06b73
Create Model_with_grid_mlflow.ipynb
SatwikReddySripathi Dec 4, 2024
27749a4
Update deploy_streamlit.py
SatwikReddySripathi Dec 4, 2024
c1c2105
Merge branch 'dhanush_model' of https://github.com/SatwikReddySripath…
SatwikReddySripathi Dec 4, 2024
a7a2aac
Update deploy_streamlit.py
SatwikReddySripathi Dec 4, 2024
c8e0abf
Update deploy_streamlit.py
SatwikReddySripathi Dec 4, 2024
863be47
Update deploy_streamlit.py
SatwikReddySripathi Dec 5, 2024
d696215
Update deploy_streamlit.py
SatwikReddySripathi Dec 5, 2024
e4a4297
Merge branch 'dhanush_model' of https://github.com/SatwikReddySripath…
SatwikReddySripathi Dec 5, 2024
150ef70
Update deploy_streamlit.py
SatwikReddySripathi Dec 5, 2024
2d13a56
Update deploy_streamlit.py
SatwikReddySripathi Dec 5, 2024
19775e8
Update deploy_streamlit.py
SatwikReddySripathi Dec 5, 2024
c65a64d
Update deploy_streamlit.py
SatwikReddySripathi Dec 5, 2024
a0e6e68
Update deploy_streamlit.py
SatwikReddySripathi Dec 5, 2024
e166ba9
Update stream.yaml
SatwikReddySripathi Dec 5, 2024
6a72d70
Update stream.yaml
SatwikReddySripathi Dec 5, 2024
720d5bb
Update deploy_streamlit.py
SatwikReddySripathi Dec 5, 2024
75dc29c
Update deploy_streamlit.py
SatwikReddySripathi Dec 5, 2024
fdf6140
Update deploy_streamlit.py
SatwikReddySripathi Dec 5, 2024
bb6cc71
Update deploy_streamlit.py
SatwikReddySripathi Dec 5, 2024
c5f755e
Create test.py
SatwikReddySripathi Dec 5, 2024
8658235
Update test.py
SatwikReddySripathi Dec 5, 2024
eb74bff
Update deploy_streamlit.py
SatwikReddySripathi Dec 5, 2024
e78e927
Update test.py
SatwikReddySripathi Dec 5, 2024
80b1123
Update deploy_streamlit.py
SatwikReddySripathi Dec 6, 2024
520ca99
streamlit update
SatwikReddySripathi Dec 7, 2024
576c2a3
Merge branch 'dhanush_model' of https://github.com/SatwikReddySripath…
SatwikReddySripathi Dec 7, 2024
3d519a0
Update Dockerfilemodel
SatwikReddySripathi Dec 7, 2024
4c2d822
Update secret_key.json
SatwikReddySripathi Dec 7, 2024
b47d00d
update stramliy
SatwikReddySripathi Dec 7, 2024
1c4d57e
Merge branch 'dhanush_model' of https://github.com/SatwikReddySripath…
SatwikReddySripathi Dec 7, 2024
af9cd35
Update stream.yaml
SatwikReddySripathi Dec 7, 2024
1556a61
Update Dockerfilemodel
SatwikReddySripathi Dec 7, 2024
d1535b7
Update Disease_Prediction.py
SatwikReddySripathi Dec 8, 2024
38f1f95
stream update files loc
SatwikReddySripathi Dec 8, 2024
7b50c10
Update Disease_Prediction.py
SatwikReddySripathi Dec 8, 2024
d26cd8f
Create Home_Page.py
SatwikReddySripathi Dec 8, 2024
e6c8745
Update Dockerfilemodel
SatwikReddySripathi Dec 8, 2024
851c69c
Update Disease_Prediction.py
SatwikReddySripathi Dec 8, 2024
eed54bc
Update Disease_Prediction.py
SatwikReddySripathi Dec 8, 2024
bd4f064
Update Disease_Prediction.py
SatwikReddySripathi Dec 8, 2024
b1ab9e0
Update Disease_Prediction.py
SatwikReddySripathi Dec 8, 2024
086507e
Update Disease_Prediction.py
SatwikReddySripathi Dec 8, 2024
09fac36
Update Disease_Prediction.py
SatwikReddySripathi Dec 8, 2024
81ff4af
Update Disease_Prediction.py
SatwikReddySripathi Dec 8, 2024
5d46834
Update Disease_Prediction.py
SatwikReddySripathi Dec 8, 2024
311af4f
final update streamlit
SatwikReddySripathi Dec 9, 2024
212a437
Create logo.png
SatwikReddySripathi Dec 9, 2024
1321658
update stream
SatwikReddySripathi Dec 9, 2024
5dd4b98
Update Home_Page.py
SatwikReddySripathi Dec 9, 2024
7542689
final update
SatwikReddySripathi Dec 9, 2024
a07dcf6
update
SatwikReddySripathi Dec 9, 2024
ce580e1
Update Disease_Prediction.py
SatwikReddySripathi Dec 9, 2024
dbe31f5
Update Home_Page.py
SatwikReddySripathi Dec 9, 2024
ff98aa0
Merge branch 'dhanush_model' of https://github.com/SatwikReddySripath…
SatwikReddySripathi Dec 9, 2024
aa5bb9f
Update Home_Page.py
SatwikReddySripathi Dec 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
218 changes: 111 additions & 107 deletions .github/workflows/model_pipeline.yaml
Original file line number Diff line number Diff line change
@@ -1,110 +1,114 @@
name: Model Training and Storage Pipeline
on:
push:
branches:
- dheeraj_model
pull_request:
branches:
- dheeraj_model
workflow_dispatch:
env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
IMAGE_NAME: "ml-model-image"
REGISTRY: "us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/ml-models-new"
GCS_BUCKET: "nih-dataset-mlops"
jobs:
model_pipeline:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Clean up Docker
run: docker system prune -af --volumes

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- id: 'auth'
name: 'Authenticate to Google Cloud'
uses: 'google-github-actions/auth@v1'
with:
credentials_json: "${{ secrets.GCP_SA_KEY }}"

- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v1'

- name: Configure Docker for GCP Artifact Registry
run: |
gcloud auth configure-docker us-east1-docker.pkg.dev --quiet

- name: Create Temporary GCP Key File
run: |
mkdir -p app
cp -r model app/
echo '${{ secrets.GCP_SA_KEY }}' | jq '.' > app/gcp-key.json

- name: Build and Push Docker Image
run: |
echo "Building Docker image..."
docker build -f Dockerfilemodel -t $REGISTRY/$IMAGE_NAME:latest .
echo "Pushing image to Artifact Registry..."
docker push $REGISTRY/$IMAGE_NAME:latest

- name: Run Model Training Script
run: |
echo "Starting model training..."
mkdir -p model_output
docker run --rm \
-v $(pwd)/model_output:/app/model_output \
-v $(pwd)/app:/app \
-e GOOGLE_APPLICATION_CREDENTIALS=/app/gcp-key.json \
$REGISTRY/$IMAGE_NAME:latest \
python model/final_model.py
echo "Model training completed."
# name: Deploy model to Vertex AI
# on:
# push:
# branches:
# - dhanush_model
# pull_request:
# branches:
# - dhanush_model
# workflow_dispatch:
# env:
# GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
# GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
# IMAGE_NAME: "ml-model-image"
# REGISTRY: "us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/ml-models-new"
# GCS_BUCKET: "nih-dataset-mlops"

# jobs:
# deploy-to-vertex-ai:
# runs-on: ubuntu-latest

# steps:
# # Step 1: Check out the repository
# - name: Checkout Code
# uses: actions/checkout@v3


# #Google Cloud Authentication
# - id: 'auth'
# name: 'Authenticate to Google Cloud'
# uses: 'google-github-actions/auth@v1'
# with:
# credentials_json: "${{ secrets.GCP_SA_KEY }}"

- name: Verify Model Output
run: |
echo "Checking contents of model_output directory:"
ls -l model_output
if [ ! -f model_output/best_model.pt ]; then
echo "❌ Model file best_model.pt not found"
exit 1
fi

- name: Upload Model to GCS
run: |
echo "Uploading model to GCS..."
TIMESTAMP=$(date +%Y%m%d%H%M%S)
gsutil cp model_output/best_model.pt gs://$GCS_BUCKET/models/best_model-$TIMESTAMP.pt
gsutil cp model_output/best_model.pt gs://$GCS_BUCKET/models/best_model-latest.pt
echo "Model uploaded successfully."

- name: Notify on Success
if: success()
run: |
echo "✅ Pipeline completed successfully:"
echo "- Model trained"
echo "- Model uploaded to GCS bucket: $GCS_BUCKET"
echo "- Docker image pushed to: $REGISTRY/$IMAGE_NAME:latest"

- name: Notify on Failure
if: failure()
run: |
echo "❌ Pipeline failed:"
echo "- Check the logs above for detailed error messages"
echo "- Verify GCP permissions and credentials"
echo "- Ensure all required services are enabled"
# - name: 'Set up Cloud SDK'
# uses: 'google-github-actions/setup-gcloud@v1'

# # Step 4: Create a model in Vertex AI Model Registry
# - name: Create or check for Existing Model Registry in Vertex AI
# id: create-model
# run: |
# MODEL_NAME="gitmodel"
# REGION="us-east1"
# MODEL_URI="gs://nih-dataset-mlops/Testing"
# echo "Checking if model exists in Vertex AI Model Registry..."
# MODEL_ID=$(gcloud ai models list --region=$REGION --filter="display_name='gitmodel'" --format="value(name)")

# if [ -z "$MODEL_ID" ]; then
# echo "Model does not exist. Creating a new model..."
# gcloud ai models upload \
# --region=$REGION \
# --display-name=$MODEL_NAME \
# --artifact-uri=$MODEL_URI \
# --container-image-uri=us-docker.pkg.dev/vertex-ai/prediction/pytorch-cpu.2-1:latest
# MODEL_ID=$(gcloud ai models list --region=$REGION --filter="display_name='gitmodel'" --format="value(name)")
# else
# echo "Model already exists: $MODEL_ID"
# fi
# echo "MODEL_ID=$MODEL_ID"
# echo "MODEL_ID=$MODEL_ID" >> $GITHUB_ENV

# # Step 7: Create or Reuse an Endpoint
# - name: Create or Reuse Endpoint
# id: create_endpoint
# run: |
# echo "Checking for existing endpoint..."
# REGION="us-east1"
# ENDPOINT_NAME=$(gcloud ai endpoints list --region=$REGION --filter="display_name='gitmodelendpoint'" --format="value(name)")

# if [ -z "$ENDPOINT_NAME" ]; then
# echo "No existing endpoint found. Creating a new one..."
# ENDPOINT_NAME=$(gcloud ai endpoints create --region=$REGION --display-name=gitmodelendpoint --format="value(name)")
# fi

# if [ -z "$ENDPOINT_NAME" ]; then
# echo "ERROR: Failed to create or retrieve endpoint. Exiting workflow."
# exit 1
# fi

# echo "ENDPOINT_NAME=$ENDPOINT_NAME"
# echo "Retrieved or created ENDPOINT_NAME: $ENDPOINT_NAME"
# echo "ENDPOINT_NAME=$ENDPOINT_NAME" >> $GITHUB_ENV


# # Step 8: Deploy Model to Endpoint
# - name: Deploy Model to Endpoint
# run: |
# echo "Deploying model $MODEL_ID to endpoint $ENDPOINT_NAME..."
# gcloud ai endpoints deploy-model $ENDPOINT_NAME --region=us-east1 --model=$MODEL_ID --display-name=gitmodelendpoint-deployment --machine-type=n1-standard-2 --traffic-split=0=100


# # Step 9: Get Endpoint URI
# - name: Get Endpoint URI
# run: |
# GCP_PROJECT_ID='812555529114'
# REGION="us-east1"
# ENDPOINT=$(gcloud ai endpoints list --region us-east1 --filter="displayName='gitmodelendpoint'" --format="value(name)")
# echo "Endpoint URI: https://us-east1-aiplatform.googleapis.com/v1/projects/${GCP_PROJECT_ID}/locations/${REGION}/endpoints/$ENDPOINT_NAME:predict"

- name: Cleanup
if: always()
run: |
echo "Performing cleanup..."
rm -f app/gcp-key.json
docker system prune -af --volumes
echo "Cleanup completed."
# # Step 10: Streamlit Application Deployment.
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.8'

# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install streamlit torch torchvision pillow requests

# - name: Deploy/Run Streamlit App
# run: |
# streamlit run streamlit_application/deploy_streamlit.py
# env:
# PORT: 8501
64 changes: 64 additions & 0 deletions .github/workflows/stream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Deploy Streamlit to Cloud Run

on:
push:
branches:
- dhanush_model
workflow_dispatch:

env:
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }}
GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}

jobs:
deploy-streamlit:
runs-on: ubuntu-latest

env:
REGISTRY: "us-east1-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/streamlit-repo"
IMAGE_TAG: ${{ github.sha }}

permissions:
contents: read
id-token: write

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}

- name: Authenticate with Google Cloud
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}

- name: Configure Docker Authentication
run: |
gcloud auth configure-docker us-east1-docker.pkg.dev --quiet

- name: Build Streamlit Docker Image
run: |
docker build \
-t ${{ env.REGISTRY }}/streamlit_app:${{ env.IMAGE_TAG }} \
-f Dockerfilemodel .

- name: Push Streamlit Docker Image
run: |
docker push ${{ env.REGISTRY }}/streamlit_app:${{ env.IMAGE_TAG }}

- name: Deploy Streamlit App to Cloud Run
run: |
gcloud run deploy streamlit-app \
--image ${{ env.REGISTRY }}/streamlit_app:${{ env.IMAGE_TAG }} \
--platform managed \
--region us-east1 \
--allow-unauthenticated \
--port 8080 \
--cpu 1 \
--memory 512Mi \
--verbosity=debug \
--timeout 600s
45 changes: 29 additions & 16 deletions Dockerfilemodel
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
# Use a base Python image
FROM python:3.8
# Base Python image
FROM python:3.9-slim

# Install dependencies
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
# Install required system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
g++ \
make \
cmake \
libffi-dev \
libssl-dev \
libpython3-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Copy over the model requirements and install
COPY model_requirements.txt .
RUN pip install --no-cache-dir -r /model_requirements.txt
# Set working directory
WORKDIR /app

# Copy the requirements file
COPY model_requirements.txt /requirements.txt

# Set the working directory
WORKDIR /app
RUN mkdir -p /app
# Upgrade pip and install Python dependencies
RUN pip install --no-cache-dir --upgrade pip setuptools wheel \
&& pip install --no-cache-dir -r /requirements.txt

# Copy the streamlit application folder
COPY application_deployed /app/application_deployed

# Copy your model training script and other necessary files
COPY model/ model/
# Expose Streamlit port
EXPOSE 8080

# Create a directory to save the model
RUN mkdir -p /app/model_output
# Set PORT environment variable
ENV PORT=8080

# Entry point for running the training script
CMD ["python", "model/final_model.py"]
# Run the main_page.py file from the streamlit_application folder
CMD ["streamlit", "run", "application_deployed/Home_Page.py", "--server.port=8080", "--server.address=0.0.0.0"]
7 changes: 7 additions & 0 deletions application_deployed/.streamlit/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[theme]
base="dark"
font="sans serif"
primaryColor = "#4CAF50" # Green for healthcare branding
backgroundColor="#121212" # Dark background for the app
secondaryBackgroundColor="#1E1E1E" # Slightly lighter for panels
textColor="#FFFFFF" # White text for readability
Loading