jjyang77 commited on
Commit
f2ff7c9
1 Parent(s): ba3922a

testing bcb docker image build

Browse files
Files changed (3) hide show
  1. .dockerignore +1 -0
  2. .gitignore +1 -0
  3. Dockerfile +21 -18
.dockerignore CHANGED
@@ -1,4 +1,5 @@
1
  .dockerignore
 
2
 
3
  # Python cache files
4
  **.pyc
 
1
  .dockerignore
2
+ Dockerfile_bak
3
 
4
  # Python cache files
5
  **.pyc
.gitignore CHANGED
@@ -3,6 +3,7 @@
3
  **/__pycache__
4
 
5
  .hypothesis/
 
6
 
7
  # Testing data
8
  /data
 
3
  **/__pycache__
4
 
5
  .hypothesis/
6
+ Dockerfile_bak
7
 
8
  # Testing data
9
  /data
Dockerfile CHANGED
@@ -1,39 +1,42 @@
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
- RUN pip install fastapi gunicorn uvicorn[standard] httpx pydantic==2.* plotly
11
 
12
- # Acquire benchmark code to local
13
- # ADD "https://api.github.com/repos/bigcode-project/bigcodebench/commits?per_page=1" latest_commit
14
- # RUN git clone https://github.com/bigcode-project/bigcodebench.git /bigcodebench
15
- # RUN cd /bigcodebench
16
- # RUN python3 -c "from bigcodebench.data import get_bigcodebench; get_bigcodebench()"
17
 
18
  # Add a new user "bigcodebenchuser"
19
  RUN adduser --disabled-password --gecos "" bigcodebenchuser
20
 
 
 
 
 
 
 
 
 
21
  RUN pip install -I --timeout 2000 -r https://github.com/bigcode-project/bigcodebench-annotation/releases/download/v0.1.0/requirements.txt
22
 
23
- COPY . .
 
 
 
 
 
 
24
 
25
- WORKDIR /
 
26
 
27
- # For matplotlib import caching in reliability guard
28
- RUN mkdir -p /api/cache/matplotlib
29
- ENV MPLCONFIGDIR=/api/cache/matplotlib
30
 
31
- RUN chmod -R 777 /api
32
 
33
- RUN chown -R bigcodebenchuser:bigcodebenchuser /api
34
 
35
  USER bigcodebenchuser
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" ]
39
- ENTRYPOINT [ "./prod.sh" ]
 
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 APScheduler==3.10.1 black==23.11.0 click==8.1.3 huggingface-hub>=0.18.0 plotly python-dateutil==2.8.2 gradio-space-ci@git+https://huggingface.co/spaces/Wauplin/gradio-space-ci@0.2.3 isort ruff gradio[oauth] schedule==1.2.2
 
 
 
 
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
  RUN pip install -I --timeout 2000 -r https://github.com/bigcode-project/bigcodebench-annotation/releases/download/v0.1.0/requirements.txt
24
 
25
+ RUN apt-get update && \
26
+ apt-get install -y \
27
+ bash \
28
+ git git-lfs \
29
+ wget curl procps \
30
+ htop vim nano && \
31
+ rm -rf /var/lib/apt/lists/*
32
 
33
+ # Pre-install the dataset
34
+ # RUN python3 -c "from bigcodebench.data import get_bigcodebench; get_bigcodebench()"
35
 
36
+ WORKDIR /app
 
 
37
 
38
+ RUN chown -R bigcodebenchuser:bigcodebenchuser /app
39
 
40
+ RUN chmod -R 777 /app
41
 
42
  USER bigcodebenchuser