Pinminh commited on
Commit ·
522638b
1
Parent(s): 7c48a00
Upload app
Browse files- .dockerignore +34 -0
- .env +7 -0
- Dockerfile +21 -0
- README.Docker.md +22 -0
- docker-compose.yml +36 -0
.dockerignore
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Include any files or directories that you don't want to be copied to your
|
| 2 |
+
# container here (e.g., local build artifacts, temporary files, etc.).
|
| 3 |
+
#
|
| 4 |
+
# For more help, visit the .dockerignore file reference guide at
|
| 5 |
+
# https://docs.docker.com/go/build-context-dockerignore/
|
| 6 |
+
|
| 7 |
+
**/.DS_Store
|
| 8 |
+
**/__pycache__
|
| 9 |
+
**/.venv
|
| 10 |
+
**/.classpath
|
| 11 |
+
**/.dockerignore
|
| 12 |
+
**/.env
|
| 13 |
+
**/.git
|
| 14 |
+
**/.gitignore
|
| 15 |
+
**/.project
|
| 16 |
+
**/.settings
|
| 17 |
+
**/.toolstarget
|
| 18 |
+
**/.vs
|
| 19 |
+
**/.vscode
|
| 20 |
+
**/*.*proj.user
|
| 21 |
+
**/*.dbmdl
|
| 22 |
+
**/*.jfm
|
| 23 |
+
**/bin
|
| 24 |
+
**/charts
|
| 25 |
+
**/docker-compose*
|
| 26 |
+
**/compose.y*ml
|
| 27 |
+
**/Dockerfile*
|
| 28 |
+
**/node_modules
|
| 29 |
+
**/npm-debug.log
|
| 30 |
+
**/obj
|
| 31 |
+
**/secrets.dev.yaml
|
| 32 |
+
**/values.dev.yaml
|
| 33 |
+
LICENSE
|
| 34 |
+
README.md
|
.env
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
STORAGE_AWS_ACCESS_KEY_ID=mcaFzihgc7wx5bkkAsFN9ywa43Hwxk
|
| 2 |
+
STORAGE_AWS_SECRET_ACCESS_KEY=TAmj-zDAs94Ol30iN7bUiTE4sxf2EMLNfU-8v-5r
|
| 3 |
+
STORAGE_AWS_BUCKET_NAME=viharme-annot-0
|
| 4 |
+
STORAGE_AWS_REGION_NAME= ap-southeast-2
|
| 5 |
+
STORAGE_AWS_FOLDER=
|
| 6 |
+
|
| 7 |
+
LABEL_STUDIO_HOST=https://heaviest-ectypal-cami.ngrok-free.dev/
|
Dockerfile
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Use the upstream Label Studio image as base
|
| 2 |
+
FROM heartexlabs/label-studio:latest
|
| 3 |
+
|
| 4 |
+
# (Optional) set some default environment variables (these can be overridden at runtime)
|
| 5 |
+
ENV STORAGE_TYPE=local \
|
| 6 |
+
LOCAL_FILES_SERVING_ENABLED=true \
|
| 7 |
+
LOCAL_FILES_DOCUMENT_ROOT=/label-studio/data \
|
| 8 |
+
CORS_ALLOW_ALL_ORIGINS=true \
|
| 9 |
+
USE_ENFORCE_CSRF_CHECKS=false
|
| 10 |
+
|
| 11 |
+
# (Optional) you might want to add extra files, scripts, or configuration here
|
| 12 |
+
# e.g., copying custom config, startup scripts, etc.
|
| 13 |
+
|
| 14 |
+
# (Optional) set a default command or entrypoint (if the base image doesn’t already)
|
| 15 |
+
# But in this case, the upstream image likely already has the right ENTRYPOINT or CMD.
|
| 16 |
+
|
| 17 |
+
# Expose port (for documentation; runtime must still map it)
|
| 18 |
+
EXPOSE 8080
|
| 19 |
+
|
| 20 |
+
# The default command is inherited from the base image
|
| 21 |
+
# CMD ["label-studio", "start"]
|
README.Docker.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Building and running your application
|
| 2 |
+
|
| 3 |
+
When you're ready, start your application by running:
|
| 4 |
+
`docker compose up --build`.
|
| 5 |
+
|
| 6 |
+
Your application will be available at http://localhost:8080.
|
| 7 |
+
|
| 8 |
+
### Deploying your application to the cloud
|
| 9 |
+
|
| 10 |
+
First, build your image, e.g.: `docker build -t myapp .`.
|
| 11 |
+
If your cloud uses a different CPU architecture than your development
|
| 12 |
+
machine (e.g., you are on a Mac M1 and your cloud provider is amd64),
|
| 13 |
+
you'll want to build the image for that platform, e.g.:
|
| 14 |
+
`docker build --platform=linux/amd64 -t myapp .`.
|
| 15 |
+
|
| 16 |
+
Then, push it to your registry, e.g. `docker push myregistry.com/myapp`.
|
| 17 |
+
|
| 18 |
+
Consult Docker's [getting started](https://docs.docker.com/go/get-started-sharing/)
|
| 19 |
+
docs for more detail on building and pushing.
|
| 20 |
+
|
| 21 |
+
### References
|
| 22 |
+
* [Docker's Python guide](https://docs.docker.com/language/python/)
|
docker-compose.yml
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Comments are provided throughout this file to help you get started.
|
| 2 |
+
# If you need more help, visit the Docker Compose reference guide at
|
| 3 |
+
# https://docs.docker.com/go/compose-spec-reference/
|
| 4 |
+
|
| 5 |
+
# Here the instructions define your application as a service called "server".
|
| 6 |
+
# This service is built from the Dockerfile in the current directory.
|
| 7 |
+
# You can add other services your application may depend on here, such as a
|
| 8 |
+
# database or a cache. For examples, see the Awesome Compose repository:
|
| 9 |
+
# https://github.com/docker/awesome-compose
|
| 10 |
+
services:
|
| 11 |
+
label-studio:
|
| 12 |
+
image: heartexlabs/label-studio:latest
|
| 13 |
+
container_name: label-studio
|
| 14 |
+
ports:
|
| 15 |
+
- "8080:8080"
|
| 16 |
+
environment:
|
| 17 |
+
# Disable any cloud storage — use local file system only
|
| 18 |
+
- STORAGE_TYPE=local
|
| 19 |
+
|
| 20 |
+
# Base directory for local media and exports (inside container)
|
| 21 |
+
- LOCAL_FILES_SERVING_ENABLED=true
|
| 22 |
+
- LOCAL_FILES_DOCUMENT_ROOT=/label-studio/data
|
| 23 |
+
|
| 24 |
+
# Label Studio host (optional)
|
| 25 |
+
- LABEL_STUDIO_HOST=${LABEL_STUDIO_HOST}
|
| 26 |
+
- CORS_ALLOW_ALL_ORIGINS=true
|
| 27 |
+
- USE_ENFORCE_CSRF_CHECKS=false
|
| 28 |
+
|
| 29 |
+
volumes:
|
| 30 |
+
# This maps your local ./data folder to /label-studio/data inside the container
|
| 31 |
+
- ./data:/label-studio/data
|
| 32 |
+
|
| 33 |
+
restart: unless-stopped
|
| 34 |
+
|
| 35 |
+
volumes:
|
| 36 |
+
labelstudio_data:
|