refractoring
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
FROM python:3.12-slim
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy the entire project
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install the package and dependencies
|
||||||
|
RUN --mount=type=cache,target=/root/.cache pip install --no-cache-dir .
|
||||||
|
|
||||||
|
# Expose Streamlit port
|
||||||
|
EXPOSE 8501
|
||||||
|
|
||||||
|
# Set environment variables
|
||||||
|
ENV PYTHONUNBUFFERED=1
|
||||||
|
|
||||||
|
# Run the Streamlit app
|
||||||
|
CMD ["auracaster-webui"]
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
FROM python:3.12-slim
|
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Copy only necessary files and directories
|
|
||||||
COPY src/auracaster_webui/ ./src/auracaster_webui/
|
|
||||||
COPY src/api_client/ ./src/api_client/
|
|
||||||
|
|
||||||
# Install the package
|
|
||||||
RUN pip install --no-cache-dir .
|
|
||||||
|
|
||||||
# Expose Streamlit port
|
|
||||||
EXPOSE 8501
|
|
||||||
|
|
||||||
# Set environment variables
|
|
||||||
ENV PYTHONUNBUFFERED=1
|
|
||||||
|
|
||||||
# Run the Streamlit app
|
|
||||||
CMD ["auracaster-webui"]
|
|
||||||
32
docker-compose.yml
Normal file
32
docker-compose.yml
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
webui:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
ports:
|
||||||
|
- "8501:8501"
|
||||||
|
volumes:
|
||||||
|
- .:/app
|
||||||
|
environment:
|
||||||
|
- PYTHONUNBUFFERED=1
|
||||||
|
# Change this URL if the translator service is running on a different host
|
||||||
|
- TRANSLATOR_API_URL=http://translator:7999
|
||||||
|
restart: unless-stopped
|
||||||
|
networks:
|
||||||
|
- webui-network
|
||||||
|
- translator-network
|
||||||
|
# Uncomment the below if you want the webui to depend on the translator
|
||||||
|
# when running the two services together
|
||||||
|
# depends_on:
|
||||||
|
# - translator
|
||||||
|
|
||||||
|
networks:
|
||||||
|
webui-network:
|
||||||
|
name: webui-network
|
||||||
|
driver: bridge
|
||||||
|
translator-network:
|
||||||
|
name: translator-network
|
||||||
|
driver: bridge
|
||||||
|
external: true
|
||||||
Reference in New Issue
Block a user