-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.dockerfile
More file actions
31 lines (23 loc) · 1.18 KB
/
app.dockerfile
File metadata and controls
31 lines (23 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# filepath: Dockerfile
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /app
# Install system dependencies that might be needed by Python packages
# For example, if sentence-transformers or its dependencies need them.
# RUN apt-get update && apt-get install -y libgomp1
# Copy the requirements file into the container
COPY requirements.txt .
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy the application code into the container
COPY ./OpenSourceCompass/ ./OpenSourceCompass/
# Make port 8501 available to the world outside this container
# Cloud Run will automatically use the PORT environment variable.
EXPOSE 8080
# Define environment variable for the port (optional, Streamlit default is 8501)
# ENV PORT=8501 (Cloud Run sets this automatically)
# Run app.py when the container launches
# Use --server.headless true for better compatibility in containerized environments
# Cloud Run injects the PORT environment variable, which Streamlit will use if available.
CMD streamlit run "OpenSourceCompass/app.py" --server.port $PORT --server.headless true