-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (28 loc) · 1.07 KB
/
Dockerfile
File metadata and controls
37 lines (28 loc) · 1.07 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
32
33
34
35
36
37
# Use Debian as the base image
FROM python:3.11-slim-bookworm
# Install necessary system packages
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
build-essential \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Download and install uv to /usr/local/bin (accessible to all users)
ADD https://astral.sh/uv/install.sh /install.sh
RUN chmod +x /install.sh && \
UV_INSTALL_DIR=/usr/local/bin /install.sh && \
rm /install.sh
# Create a non-root user and home directory
RUN useradd -m user
# Set working directory under the user's home
WORKDIR /home/user/BioAutoML-FAST
# Copy the application code and fix ownership
COPY . /home/user/BioAutoML-FAST
RUN chown -R user:user /home/user/BioAutoML-FAST
# Activate virtual environment path
ENV PATH="/home/user/BioAutoML-FAST/.venv/bin:${PATH}"
# Switch to the non-root user
USER user
# Install dependencies
RUN uv sync
# Default command (just streamlit, others will run in separate containers)
CMD ["bash", "-c", "cd App && streamlit run app.py --server.port 8501 --server.address 0.0.0.0"]