Xyro123 commited on
Commit
12d6a5a
·
verified ·
1 Parent(s): 0603a96

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +48 -0
Dockerfile ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Base image
2
+ FROM python:3.10
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Update pip
8
+ RUN pip install --upgrade pip
9
+
10
+ # Install system dependencies
11
+ RUN apt-get update && apt-get install -y \
12
+ git \
13
+ git-lfs \
14
+ ffmpeg \
15
+ libsm6 \
16
+ libxext6 \
17
+ cmake \
18
+ rsync \
19
+ libgl1 \
20
+ curl \
21
+ && rm -rf /var/lib/apt/lists/* \
22
+ && git lfs install
23
+
24
+ # Install Node.js 20.x
25
+ RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
26
+ apt-get install -y nodejs && \
27
+ rm -rf /var/lib/apt/lists/*
28
+
29
+ # Install fontsource-inter (Node.js package)
30
+ RUN npm install fontsource-inter
31
+
32
+ # Copy requirements.txt
33
+ COPY requirements.txt /tmp/requirements.txt
34
+
35
+ # Install Python dependencies
36
+ RUN pip install --no-cache-dir -r /tmp/requirements.txt
37
+
38
+ # Copy app code
39
+ COPY ./ /app
40
+
41
+ # Create a symlink for convenience (optional)
42
+ RUN mkdir -p /home/user && ( [ -e /home/user/app ] || ln -s /app/ /home/user/app ) || true
43
+
44
+ # Expose port (if using uvicorn or Gradio)
45
+ EXPOSE 7860
46
+
47
+ # Default command
48
+ CMD ["python", "app.py"]