build files clean up
This commit is contained in:
parent
2a2eea7d10
commit
9df05c3003
@ -1,36 +0,0 @@
|
|||||||
FROM python:3.12-slim
|
|
||||||
|
|
||||||
# Set working directory
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Set environment variables
|
|
||||||
#ENV PYTHONDONTWRITEBYTECODE=1 \
|
|
||||||
# PYTHONUNBUFFERED=1 \
|
|
||||||
# STREAMLIT_SERVER_PORT=8501 \
|
|
||||||
# STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
|
||||||
ARG PYTHONDONTWRITEBYTECODE=1 \
|
|
||||||
PYTHONUNBUFFERED=1 \
|
|
||||||
STREAMLIT_SERVER_PORT=8501 \
|
|
||||||
STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
|
||||||
|
|
||||||
# Install system dependencies
|
|
||||||
#RUN apt-get update && \
|
|
||||||
# apt-get install -y --no-install-recommends \
|
|
||||||
# build-essential \
|
|
||||||
# curl \
|
|
||||||
# && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Copy requirements first to leverage Docker cache
|
|
||||||
COPY requirements.txt .
|
|
||||||
|
|
||||||
# Install Python dependencies
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
|
||||||
|
|
||||||
# Copy the application code
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Expose the port Streamlit runs on
|
|
||||||
EXPOSE 8501
|
|
||||||
|
|
||||||
# Command to run the application
|
|
||||||
CMD ["streamlit", "run", "app.py"]
|
|
8
.build/dev/Dockerfile
Normal file
8
.build/dev/Dockerfile
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
FROM python:3.12-slim
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY requirements.txt .
|
||||||
|
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
16
.build/prod/Dockerfile
Normal file
16
.build/prod/Dockerfile
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
FROM python:3.12-slim
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
ARG PYTHONDONTWRITEBYTECODE=1 \
|
||||||
|
PYTHONUNBUFFERED=1 \
|
||||||
|
STREAMLIT_SERVER_PORT=8501 \
|
||||||
|
STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
||||||
|
|
||||||
|
COPY requirements.txt .
|
||||||
|
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
COPY app.py .
|
||||||
|
|
||||||
|
CMD streamlit run app.py
|
@ -1,7 +1,6 @@
|
|||||||
services:
|
services:
|
||||||
mvpost-package-no-finder:
|
mvpost-package-no-finder:
|
||||||
build:
|
build:
|
||||||
context: ..
|
context: ../../
|
||||||
dockerfile: .build/Dockerfile
|
dockerfile: .build/prod/Dockerfile
|
||||||
image: git.shihaam.dev/shihaam/mvpost-package-no-finder
|
image: git.shihaam.dev/shihaam/mvpost-package-no-finder
|
||||||
container_name: mvpost-package-no-finder
|
|
10
compose.yml
10
compose.yml
@ -1,14 +1,16 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
mvpost-package-no-finder:
|
mvpost-package-no-finder:
|
||||||
image: git.shihaam.dev/shihaam/mvpost-package-no-finder
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: .build/dev/Dockerfile
|
||||||
container_name: mvpost-package-no-finder
|
container_name: mvpost-package-no-finder
|
||||||
|
hostname: mvpost-package-no-finder
|
||||||
ports:
|
ports:
|
||||||
- "8501:8501"
|
- 8501:8501
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
environment:
|
environment:
|
||||||
- STREAMLIT_SERVER_PORT=8501
|
- STREAMLIT_SERVER_PORT=8501
|
||||||
- STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
- STREAMLIT_SERVER_ADDRESS=0.0.0.0
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
command: streamlit run app.py
|
||||||
|
Loading…
x
Reference in New Issue
Block a user