Spaces:
Runtime error
Runtime error
Commit ·
dbffa39
1
Parent(s): 27ee72e
feat: added .dvc
Browse files- .dvc/.gitignore +3 -0
- .dvc/config +0 -0
- .dvcignore +3 -0
- Dockerfile +8 -2
.dvc/.gitignore
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/config.local
|
| 2 |
+
/tmp
|
| 3 |
+
/cache
|
.dvc/config
ADDED
|
File without changes
|
.dvcignore
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Add patterns of files dvc should ignore, which could improve
|
| 2 |
+
# the performance. Learn more at
|
| 3 |
+
# https://dvc.org/doc/user-guide/dvcignore
|
Dockerfile
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
|
|
|
| 3 |
RUN useradd -m -u 1000 user
|
| 4 |
USER user
|
| 5 |
ENV PATH="/home/user/.local/bin:$PATH"
|
|
@@ -9,13 +10,18 @@ WORKDIR /app
|
|
| 9 |
# Create logs directory
|
| 10 |
RUN mkdir -p /app/logs/running_logs && chown user:user /app/logs/running_logs
|
| 11 |
|
|
|
|
| 12 |
COPY --chown=user ./requirements.txt requirements.txt
|
| 13 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 14 |
|
| 15 |
# Install DVC
|
| 16 |
RUN pip install --no-cache-dir dvc
|
| 17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
COPY --chown=user . /app
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
|
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
+
# Create a non-root user
|
| 4 |
RUN useradd -m -u 1000 user
|
| 5 |
USER user
|
| 6 |
ENV PATH="/home/user/.local/bin:$PATH"
|
|
|
|
| 10 |
# Create logs directory
|
| 11 |
RUN mkdir -p /app/logs/running_logs && chown user:user /app/logs/running_logs
|
| 12 |
|
| 13 |
+
# Copy the requirements and install them
|
| 14 |
COPY --chown=user ./requirements.txt requirements.txt
|
| 15 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 16 |
|
| 17 |
# Install DVC
|
| 18 |
RUN pip install --no-cache-dir dvc
|
| 19 |
|
| 20 |
+
# Explicitly copy the .dvc directory (if it's excluded by .dockerignore)
|
| 21 |
+
COPY --chown=user .dvc /app/.dvc
|
| 22 |
+
|
| 23 |
+
# Copy the rest of the project files
|
| 24 |
COPY --chown=user . /app
|
| 25 |
|
| 26 |
+
# Run the DVC reproduction command
|
| 27 |
+
CMD ["dvc", "repro"]
|