Spaces:
Sleeping
Sleeping
Commit
·
a79fd75
1
Parent(s):
64e55d6
fix: advanced setup
Browse files- Dockerfile +6 -3
- requirements.txt +0 -1
Dockerfile
CHANGED
|
@@ -1,10 +1,11 @@
|
|
| 1 |
# Stage 1: Build stage
|
| 2 |
-
FROM python:3.10-slim
|
| 3 |
|
| 4 |
# Install build dependencies
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
ffmpeg \
|
| 7 |
libsndfile1 \
|
|
|
|
| 8 |
&& rm -rf /var/lib/apt/lists/*
|
| 9 |
|
| 10 |
# Create a non-root user
|
|
@@ -18,7 +19,7 @@ ENV PATH="/home/user/.local/bin:$PATH"
|
|
| 18 |
WORKDIR /app
|
| 19 |
|
| 20 |
# Copy requirements and setup scripts
|
| 21 |
-
COPY --chown=user requirements.txt setup_imagebind.py ./
|
| 22 |
|
| 23 |
# Install dependencies into a virtual environment
|
| 24 |
RUN python -m venv /app/venv
|
|
@@ -55,7 +56,9 @@ COPY --from=builder --chown=user /app/venv /app/venv
|
|
| 55 |
ENV PATH="/app/venv/bin:$PATH"
|
| 56 |
|
| 57 |
# Copy ImageBind from builder
|
| 58 |
-
COPY --from=builder --chown=user /app/imagebind
|
|
|
|
|
|
|
| 59 |
|
| 60 |
# Copy application code
|
| 61 |
COPY --chown=user main.py .
|
|
|
|
| 1 |
# Stage 1: Build stage
|
| 2 |
+
FROM python:3.10-slim AS builder
|
| 3 |
|
| 4 |
# Install build dependencies
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
ffmpeg \
|
| 7 |
libsndfile1 \
|
| 8 |
+
git \
|
| 9 |
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
# Create a non-root user
|
|
|
|
| 19 |
WORKDIR /app
|
| 20 |
|
| 21 |
# Copy requirements and setup scripts
|
| 22 |
+
COPY --chown=user requirements.txt setup_imagebind.py README.md main.py ./
|
| 23 |
|
| 24 |
# Install dependencies into a virtual environment
|
| 25 |
RUN python -m venv /app/venv
|
|
|
|
| 56 |
ENV PATH="/app/venv/bin:$PATH"
|
| 57 |
|
| 58 |
# Copy ImageBind from builder
|
| 59 |
+
COPY --from=builder --chown=user /app/imagebind* .
|
| 60 |
+
COPY --from=builder --chown=user /app/setup.py .
|
| 61 |
+
COPY --from=builder --chown=user /app/build .
|
| 62 |
|
| 63 |
# Copy application code
|
| 64 |
COPY --chown=user main.py .
|
requirements.txt
CHANGED
|
@@ -7,7 +7,6 @@ ftfy
|
|
| 7 |
regex
|
| 8 |
einops
|
| 9 |
fvcore
|
| 10 |
-
eva-decord>=0.6.1
|
| 11 |
iopath
|
| 12 |
numpy>=1.24.0,<2.0.0
|
| 13 |
matplotlib
|
|
|
|
| 7 |
regex
|
| 8 |
einops
|
| 9 |
fvcore
|
|
|
|
| 10 |
iopath
|
| 11 |
numpy>=1.24.0,<2.0.0
|
| 12 |
matplotlib
|