File size: 670 Bytes
a6bbf63
 
dbffa39
a6bbf63
 
 
 
 
 
0c746c9
 
 
dbffa39
a6bbf63
 
 
0c746c9
a6bbf63
 
dbffa39
 
 
 
0c746c9
 
dbffa39
 
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
FROM python:3.9

# Create a non-root user
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"

WORKDIR /app

# Create logs directory
RUN mkdir -p /app/logs/running_logs && chown user:user /app/logs/running_logs

# Copy the requirements and install them
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Install DVC
RUN pip install --no-cache-dir dvc

# Explicitly copy the .dvc directory (if it's excluded by .dockerignore)
COPY --chown=user .dvc /app/.dvc

# Copy the rest of the project files
COPY --chown=user . /app

# Run the DVC reproduction command
CMD ["dvc", "repro"]