Hiren122 commited on
Commit
18961fc
·
verified ·
1 Parent(s): baa885f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -9
Dockerfile CHANGED
@@ -1,14 +1,30 @@
1
- FROM python:3.9
 
2
 
3
- # Set up the working directory
4
  WORKDIR /app
5
 
6
- # Copy the requirements file and install dependencies
7
- COPY requirements.txt requirements.txt
8
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
 
 
 
9
 
10
- # Copy the rest of the application code
11
- COPY . .
12
 
13
- # Run the application on port 7860
14
- CMD ["python", "app.py"]
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.10 slim image as base
2
+ FROM python:3.10-slim
3
 
4
+ # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ git \
10
+ curl \
11
+ build-essential \
12
+ && rm -rf /var/lib/apt/lists/*
13
 
14
+ # Clone the repository
15
+ RUN git clone https://github.com/Hiren223344/lmarena.git /app
16
 
17
+ # Install Python dependencies
18
+ # Adjust requirements file path if different in your project
19
+ RUN pip install --no-cache-dir --upgrade pip && \
20
+ if [ -f requirements.txt ]; then pip install --no-cache-dir -r requirements.txt; fi
21
+
22
+ # Expose port (adjust if your app uses a different port)
23
+ EXPOSE 7860
24
+
25
+ # Set environment variables for Hugging Face Spaces
26
+ ENV GRADIO_SERVER_NAME="0.0.0.0"
27
+ ENV GRADIO_SERVER_PORT=7860
28
+
29
+ # Run the main application
30
+ CMD ["python", "src/main.py"]