Spaces:
Sleeping
Sleeping
jjyang77
commited on
Commit
·
ccc64a6
1
Parent(s):
03725ff
add user bigcodebenchuser
Browse files- Dockerfile +14 -13
- api/__init__.py +0 -0
- api/app.py +0 -0
- api/bigcodebench_data.py +0 -0
- api/code_execution.py +0 -0
Dockerfile
CHANGED
@@ -1,38 +1,39 @@
|
|
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 |
-
# Add a new user "bigcodebenchuser"
|
11 |
-
#RUN adduser --disabled-password --gecos "" bigcodebenchuser
|
12 |
-
|
13 |
-
#RUN rm -rf /bigcodebench
|
14 |
-
|
15 |
# Acquire benchmark code to local
|
16 |
# ADD "https://api.github.com/repos/bigcode-project/bigcodebench/commits?per_page=1" latest_commit
|
17 |
# RUN git clone https://github.com/bigcode-project/bigcodebench.git /bigcodebench
|
18 |
-
|
19 |
-
#RUN
|
20 |
-
|
21 |
-
# Pre-install the dataset
|
22 |
-
#RUN python3 -c "from bigcodebench.data import get_bigcodebench; get_bigcodebench()"
|
23 |
|
24 |
RUN pip install fastapi gunicorn uvicorn[standard] httpx pydantic==2.*
|
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 |
COPY . .
|
29 |
|
|
|
|
|
30 |
# For matplotlib import caching in reliability guard
|
31 |
-
RUN mkdir -p /cache/matplotlib
|
32 |
-
ENV MPLCONFIGDIR=/cache/matplotlib
|
33 |
|
34 |
-
|
|
|
|
|
35 |
|
|
|
36 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
37 |
# CMD ["uvicorn", "api.app:app", "--host", "0.0.0.0", "--port", "7860"]
|
38 |
# ENTRYPOINT [ "./dev.sh" ]
|
|
|
1 |
# Better use newer Python as generated code can use new features
|
2 |
FROM python:3.10-slim
|
3 |
|
4 |
+
# RUN rm -rf /var/lib/apt/lists/*
|
5 |
# install git, g++ and python3-tk
|
6 |
RUN apt-get update && apt-get install -y git g++ python3-tk zip unzip procps r-base
|
7 |
|
8 |
# upgrade to latest pip
|
9 |
RUN pip install --upgrade pip
|
10 |
|
|
|
|
|
|
|
|
|
|
|
11 |
# Acquire benchmark code to local
|
12 |
# ADD "https://api.github.com/repos/bigcode-project/bigcodebench/commits?per_page=1" latest_commit
|
13 |
# RUN git clone https://github.com/bigcode-project/bigcodebench.git /bigcodebench
|
14 |
+
# RUN cd /bigcodebench
|
15 |
+
# RUN python3 -c "from bigcodebench.data import get_bigcodebench; get_bigcodebench()"
|
|
|
|
|
|
|
16 |
|
17 |
RUN pip install fastapi gunicorn uvicorn[standard] httpx pydantic==2.*
|
18 |
|
19 |
RUN pip install -I --timeout 2000 -r https://github.com/bigcode-project/bigcodebench-annotation/releases/download/v0.1.0/requirements.txt
|
20 |
|
21 |
+
# Add a new user "bigcodebenchuser"
|
22 |
+
RUN adduser --disabled-password --gecos "" bigcodebenchuser
|
23 |
+
|
24 |
COPY . .
|
25 |
|
26 |
+
WORKDIR /
|
27 |
+
|
28 |
# For matplotlib import caching in reliability guard
|
29 |
+
RUN mkdir -p /api/cache/matplotlib
|
30 |
+
ENV MPLCONFIGDIR=/api/cache/matplotlib
|
31 |
|
32 |
+
RUN chmod -R 777 /api
|
33 |
+
|
34 |
+
RUN chown -R bigcodebenchuser:bigcodebenchuser /api
|
35 |
|
36 |
+
USER bigcodebenchuser
|
37 |
# Start the FastAPI app on port 7860, the default port expected by Spaces
|
38 |
# CMD ["uvicorn", "api.app:app", "--host", "0.0.0.0", "--port", "7860"]
|
39 |
# ENTRYPOINT [ "./dev.sh" ]
|
api/__init__.py
CHANGED
File without changes
|
api/app.py
CHANGED
File without changes
|
api/bigcodebench_data.py
CHANGED
File without changes
|
api/code_execution.py
CHANGED
File without changes
|