-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🐳 add Dockerfile for HuggingFace space
Introduce Dockerfile for creating a standardized runtime environment using Python 3.12. Integrate UV tools for dependency management and running the Dagster server. Create new 'space' target in Makefile for uploading Dockerfile to Hugging Face. Update web page with new 'Data Assets' link pointing to hosted dataset workspace.
- Loading branch information
1 parent
1ee1d75
commit 5fe668d
Showing
3 changed files
with
30 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM python:3.12 | ||
|
||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv | ||
|
||
RUN useradd -m -u 1000 user | ||
USER user | ||
ENV HOME=/home/user \ | ||
PATH=/home/user/.local/bin:$PATH | ||
|
||
# Copy the datadex project and dependencies | ||
RUN git clone https://github.com/datonic/datadex.git $HOME/app && \ | ||
cd $HOME/app && \ | ||
chown -R user:user . | ||
|
||
# Create a data directory and set ownership | ||
RUN mkdir -p $HOME/app/data && chown -R user:user $HOME/app/data | ||
|
||
# Set the working directory | ||
WORKDIR $HOME/app | ||
|
||
# Sync the dependencies | ||
RUN [ "uv", "sync" ] | ||
|
||
# Run the Dagster server | ||
CMD [ "uv", "run", "dagster-webserver", "--read-only", "-h", "0.0.0.0", "-p", "7860" ] |
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