THED2 commited on
Commit
1d60ab8
·
verified ·
1 Parent(s): caa03e5

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +44 -8
Dockerfile CHANGED
@@ -1,12 +1,48 @@
1
- FROM python:3.11-slim
 
2
 
3
- # Install git for smolagents
4
- RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
 
 
5
 
6
- WORKDIR /app
7
- COPY requirements.txt .
8
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  COPY . .
10
 
11
- EXPOSE 7860
12
- CMD ["python", "app.py"]
 
 
 
 
1
+ # Base image standard Python ke sath
2
+ FROM python:3.10-slim
3
 
4
+ # System tools, Java (Android ke liye), aur Node.js (Web ke liye) install karein
5
+ RUN apt-get update && apt-get install -y \
6
+ curl \
7
+ git \
8
+ unzip \
9
+ openjdk-17-jdk-headless \
10
+ nodejs \
11
+ npm \
12
+ && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Android SDK setup karne ke liye environment variables
15
+ ENV ANDROID_HOME=/opt/android-sdk
16
+ ENV PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools
17
+
18
+ # Android Command Line Tools download karein
19
+ RUN mkdir -p $ANDROID_HOME/cmdline-tools \
20
+ && curl -o commandlinetools.zip https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip \
21
+ && unzip commandlinetools.zip -d $ANDROID_HOME/cmdline-tools \
22
+ && mv $ANDROID_HOME/cmdline-tools/cmdline-tools $ANDROID_HOME/cmdline-tools/latest \
23
+ && rm commandlinetools.zip
24
+
25
+ # Android licenses accept karein
26
+ RUN yes | sdkmanager --licenses
27
+
28
+ # Flutter SDK install karein
29
+ ENV FLUTTER_HOME=/opt/flutter
30
+ ENV PATH=$PATH:$FLUTTER_HOME/bin
31
+ RUN git clone https://github.com/flutter/flutter.git -b stable $FLUTTER_HOME \
32
+ && flutter doctor
33
+
34
+ # Working directory set karein
35
+ WORKDIR /code
36
+
37
+ # Python dependencies copy aur install karein
38
+ COPY ./requirements.txt /code/requirements.txt
39
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
40
+
41
+ # Pura project copy karein
42
  COPY . .
43
 
44
+ # Hugging Face permissions ke liye
45
+ RUN chmod -R 777 /code
46
+
47
+ # App run karne ki command (FastAPI use kar rahe hain API access ke liye)
48
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]