Create dockerfile
Browse files- dockerfile +27 -0
dockerfile
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
# Install system dependencies
|
| 6 |
+
RUN apt-get update && apt-get install -y \
|
| 7 |
+
git \
|
| 8 |
+
git-lfs \
|
| 9 |
+
ffmpeg \
|
| 10 |
+
libsm6 \
|
| 11 |
+
libxext6 \
|
| 12 |
+
cmake \
|
| 13 |
+
build-essential \
|
| 14 |
+
libgl1-mesa-glx \
|
| 15 |
+
&& apt-get clean \
|
| 16 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
+
|
| 18 |
+
# Install Python packages
|
| 19 |
+
RUN pip install --no-cache-dir --upgrade pip
|
| 20 |
+
RUN pip install --no-cache-dir gradio torch transformers accelerate
|
| 21 |
+
RUN pip install --no-cache-dir einops timm av opencv-python-headless
|
| 22 |
+
|
| 23 |
+
# Copy application code
|
| 24 |
+
COPY . /app/
|
| 25 |
+
|
| 26 |
+
# Define command to run the application
|
| 27 |
+
CMD ["python", "app.py"]
|