tonne commited on
Commit
26f4d6f
1 Parent(s): f5f242b

Update buildkite

Browse files
Files changed (3) hide show
  1. Dockerfile +7 -12
  2. README.md +1 -0
  3. main.py +11 -2
Dockerfile CHANGED
@@ -1,12 +1,7 @@
1
- # FROM ubuntu:latest
2
- # USER root
3
- # RUN apt-get update && apt-get install -y curl
4
- # RUN mkdir .buildkite-agent
5
- # RUN chmod 777 .buildkite-agent
6
- # RUN chown -R root:root .
7
- # COPY script.sh .
8
- # CMD ["bash", "script.sh"]
9
- #
10
-
11
- FROM buildkite/agent:ubuntu
12
- ENV BUILDKITE_AGENT_TOKEN "c6be0e8718a3894eb2aaa162566a3584461f7d42a962116595"
 
1
+ FROM python:3.11.6-alpine3.18
2
+ RUN apt-get update && apt-get install -y curl
3
+ USER tonne
4
+ WORKDIR /code
5
+ RUN pip install fastapi uvicorn
6
+ COPY . /code
7
+ CMD ["uvicorn", "main:app", "--reload"]
 
 
 
 
 
README.md CHANGED
@@ -3,6 +3,7 @@ title: Buildkite
3
  emoji: 🏆
4
  colorFrom: blue
5
  colorTo: indigo
 
6
  sdk: docker
7
  pinned: false
8
  ---
 
3
  emoji: 🏆
4
  colorFrom: blue
5
  colorTo: indigo
6
+ app_port: 8000
7
  sdk: docker
8
  pinned: false
9
  ---
main.py CHANGED
@@ -1,4 +1,13 @@
1
  import os
2
- import subprocess
3
 
4
- subprocess.run(["~/.buildkite-agent/bin/buildkite-agent", "start"])
 
 
 
 
 
 
 
 
 
 
1
  import os
2
+ from fastapi import FastAPI
3
 
4
+ app = FastAPI()
5
+
6
+
7
+ @app.get("/")
8
+ async def root():
9
+ return {"message": "Hello World"}
10
+
11
+ # import subprocess
12
+ #
13
+ # subprocess.run(["~/.buildkite-agent/bin/buildkite-agent", "start"])