-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
73 changed files
with
2,557 additions
and
5,030 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Overview | ||
In this folder, we create the different dockerfiles for using pykoi. | ||
|
||
1. `pykoi-cpu`: The base image for the cpu-based usage. | ||
2. `pykoi-cpu-custom`: When you run this docker image, try to modify the `app.py` and mount it when running the docker container. | ||
|
||
To run a docker container, we can use the following command: | ||
```bash | ||
docker run -dp 5000:5000 -v $(pwd)/app.py:/app/app.py \ | ||
--name alex_test \ | ||
pykoi/pykoi-cpu:app | ||
``` | ||
|
||
Note that we need to keep the exposed port as 5000 (default value) to make the server work. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM pykoi/pykoi-cpu:base | ||
|
||
# set the working directory in the container | ||
WORKDIR /app | ||
|
||
# copy the content | ||
COPY . /app | ||
|
||
# Expose the port on which the app will be running | ||
EXPOSE 5000 | ||
|
||
# For dev | ||
CMD ["python", "app.py"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
FROM python:3.10 | ||
LABEL maintainer="Pykio Team" | ||
LABEL repository="Pykoi" | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt update && \ | ||
apt install -y bash \ | ||
build-essential \ | ||
git \ | ||
git-lfs \ | ||
curl \ | ||
ca-certificates \ | ||
libsndfile1-dev | ||
|
||
# make sure to use venv | ||
RUN python -m venv /opt/venv | ||
ENV PATH="/opt/venv/bin:$PATH" | ||
|
||
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py) | ||
# follow the instructions here: https://cloud.google.com/tpu/docs/run-in-container#train_a_jax_model_in_a_docker_container | ||
RUN python -m pip install --no-cache-dir --upgrade pip && \ | ||
python -m pip install --upgrade --no-cache-dir \ | ||
pykoi | ||
|
||
CMD ["/bin/bash"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM python:3.10 | ||
LABEL maintainer="Pykio Team" | ||
LABEL repository="Pykoi" | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt update && \ | ||
apt install -y bash \ | ||
build-essential \ | ||
git \ | ||
git-lfs \ | ||
curl \ | ||
ca-certificates \ | ||
libsndfile1-dev \ | ||
libgl1 | ||
|
||
# make sure to use venv | ||
RUN python3 -m venv /opt/venv | ||
ENV PATH="/opt/venv/bin:$PATH" | ||
|
||
# pre-install the heavy dependencies (these can later be overridden by the deps from setup.py) | ||
RUN python3 -m pip install --no-cache-dir --upgrade pip && \ | ||
python3 -m pip install --no-cache-dir \ | ||
torch \ | ||
torchvision \ | ||
torchaudio && \ | ||
python3 -m pip install --no-cache-dir \ | ||
pykoi | ||
|
||
CMD ["/bin/bash"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.