hannabaker commited on
Commit
41554ec
·
verified ·
1 Parent(s): fa8bd4c

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use a lean Python base image
2
+ FROM python:3.9-slim
3
+
4
+ # Set the working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies for megatools (C-based program)
8
+ RUN apt-get update && apt-get install -y \
9
+ build-essential \
10
+ libglib2.0-dev \
11
+ libssl-dev \
12
+ libcurl4-openssl-dev \
13
+ libgirepository1.0-dev \
14
+ git \
15
+ --no-install-recommends && \
16
+ rm -rf /var/lib/apt/lists/*
17
+
18
+ # Clone, compile, and install megatools from source
19
+ RUN git clone https://megous.com/git/megatools
20
+ WORKDIR /app/megatools
21
+ RUN ./configure && make && make install
22
+ WORKDIR /app
23
+
24
+ # Install Python dependencies
25
+ COPY requirements.txt .
26
+ RUN pip install --no-cache-dir -r requirements.txt
27
+
28
+ # Copy the application files into the container
29
+ COPY . .
30
+
31
+ # Expose the port the app will run on (Hugging Face default)
32
+ EXPOSE 7860
33
+
34
+ # Command to run the application
35
+ CMD ["python", "app.py"]