Spaces:
Running
Running
Create Dockerfile
Browse files- Dockerfile +42 -0
Dockerfile
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Base image
|
2 |
+
FROM python:3.10
|
3 |
+
|
4 |
+
# Install system dependencies
|
5 |
+
RUN apt-get update && apt-get install -y \
|
6 |
+
git \
|
7 |
+
git-lfs \
|
8 |
+
ffmpeg \
|
9 |
+
libsm6 \
|
10 |
+
libxext6 \
|
11 |
+
cmake \
|
12 |
+
rsync \
|
13 |
+
libgl1-mesa-glx && \
|
14 |
+
rm -rf /var/lib/apt/lists/* && \
|
15 |
+
git lfs install
|
16 |
+
|
17 |
+
# Set the working directory
|
18 |
+
WORKDIR /home/user/app
|
19 |
+
|
20 |
+
# Install Python dependencies
|
21 |
+
RUN pip install --no-cache-dir pip==22.3.1 && \
|
22 |
+
pip install --no-cache-dir \
|
23 |
+
datasets \
|
24 |
+
"huggingface-hub>=0.19" \
|
25 |
+
"hf-transfer>=0.1.4" \
|
26 |
+
"protobuf<4" \
|
27 |
+
"click<8.1" \
|
28 |
+
"pydantic~=1.0"
|
29 |
+
|
30 |
+
# Clone CorrectLy repository and install it manually
|
31 |
+
RUN git clone https://github.com/rounakdatta/CorrectLy.git /home/user/CorrectLy && \
|
32 |
+
pip install -r /home/user/CorrectLy/requirements.txt
|
33 |
+
|
34 |
+
# Copy the project requirements file and install dependencies
|
35 |
+
COPY requirements.txt /tmp/requirements.txt
|
36 |
+
RUN pip install --no-cache-dir -r /tmp/requirements.txt
|
37 |
+
|
38 |
+
# Set the user to run the application
|
39 |
+
USER 1000
|
40 |
+
|
41 |
+
# Command to run the application
|
42 |
+
CMD ["python", "app.py"]
|