Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +23 -21
Dockerfile
CHANGED
|
@@ -1,38 +1,40 @@
|
|
| 1 |
# Better use newer Python as generated code can use new features
|
| 2 |
-
FROM python:3.10-slim
|
| 3 |
|
| 4 |
-
# install git, g++ and python3-tk
|
| 5 |
-
RUN apt-get update && apt-get install -y git g++ python3-tk zip unzip procps r-base
|
| 6 |
|
| 7 |
-
# upgrade to latest pip
|
| 8 |
-
RUN pip install --upgrade pip
|
| 9 |
|
| 10 |
-
RUN pip install gradio==4.31.0 gradio[oauth]
|
| 11 |
|
| 12 |
-
# Add a new user "bigcodebenchuser"
|
| 13 |
-
RUN adduser --disabled-password --gecos "" bigcodebenchuser
|
| 14 |
|
| 15 |
-
RUN rm -rf /bigcodebench
|
| 16 |
|
| 17 |
-
# Acquire benchmark code to local
|
| 18 |
-
ADD "https://api.github.com/repos/bigcode-project/bigcodebench/commits?per_page=1" latest_commit
|
| 19 |
-
RUN git clone https://github.com/bigcode-project/bigcodebench.git /bigcodebench
|
| 20 |
|
| 21 |
-
RUN cd /bigcodebench && pip install .
|
| 22 |
|
| 23 |
-
# Pre-install the dataset
|
| 24 |
-
RUN python3 -c "from bigcodebench.data import get_bigcodebench; get_bigcodebench()"
|
| 25 |
|
| 26 |
-
RUN pip install -I --timeout 2000 -r https://github.com/bigcode-project/bigcodebench-annotation/releases/download/v0.1.0/requirements.txt
|
| 27 |
|
| 28 |
-
WORKDIR /app
|
| 29 |
|
| 30 |
-
RUN chown -R bigcodebenchuser:bigcodebenchuser /app
|
| 31 |
|
| 32 |
-
RUN chmod -R 777 /app
|
| 33 |
|
| 34 |
-
COPY . /app
|
| 35 |
|
| 36 |
-
USER bigcodebenchuser
|
| 37 |
|
|
|
|
|
|
|
| 38 |
CMD ["python", "app.py"]
|
|
|
|
| 1 |
# Better use newer Python as generated code can use new features
|
| 2 |
+
# FROM python:3.10-slim
|
| 3 |
|
| 4 |
+
# # install git, g++ and python3-tk
|
| 5 |
+
# RUN apt-get update && apt-get install -y git g++ python3-tk zip unzip procps r-base
|
| 6 |
|
| 7 |
+
# # upgrade to latest pip
|
| 8 |
+
# RUN pip install --upgrade pip
|
| 9 |
|
| 10 |
+
# RUN pip install gradio==4.31.0 gradio[oauth]
|
| 11 |
|
| 12 |
+
# # Add a new user "bigcodebenchuser"
|
| 13 |
+
# RUN adduser --disabled-password --gecos "" bigcodebenchuser
|
| 14 |
|
| 15 |
+
# RUN rm -rf /bigcodebench
|
| 16 |
|
| 17 |
+
# # Acquire benchmark code to local
|
| 18 |
+
# ADD "https://api.github.com/repos/bigcode-project/bigcodebench/commits?per_page=1" latest_commit
|
| 19 |
+
# RUN git clone https://github.com/bigcode-project/bigcodebench.git /bigcodebench
|
| 20 |
|
| 21 |
+
# RUN cd /bigcodebench && pip install .
|
| 22 |
|
| 23 |
+
# # Pre-install the dataset
|
| 24 |
+
# RUN python3 -c "from bigcodebench.data import get_bigcodebench; get_bigcodebench()"
|
| 25 |
|
| 26 |
+
# RUN pip install -I --timeout 2000 -r https://github.com/bigcode-project/bigcodebench-annotation/releases/download/v0.1.0/requirements.txt
|
| 27 |
|
| 28 |
+
# WORKDIR /app
|
| 29 |
|
| 30 |
+
# RUN chown -R bigcodebenchuser:bigcodebenchuser /app
|
| 31 |
|
| 32 |
+
# RUN chmod -R 777 /app
|
| 33 |
|
| 34 |
+
# COPY . /app
|
| 35 |
|
| 36 |
+
# USER bigcodebenchuser
|
| 37 |
|
| 38 |
+
FROM bigcodebench/bigcodebench-gradio:latest
|
| 39 |
+
COPY . /app
|
| 40 |
CMD ["python", "app.py"]
|