ds2api / _fix.py
204848
Initial commit: ds2api with HF Spaces support
feccc69
Raw
History Blame Contribute Delete
291 Bytes
import pathlib
p = pathlib.Path("Dockerfile")
t = p.read_text()
old = 'CMD["/usr/local/bin/ds2api"]'
new = 'COPY entrypoint.sh /usr/local/bin/entrypoint.sh\nRUN chmod +x /usr/local/bin/entrypoint.sh\nCMD["/usr/local/bin/entrypoint.sh"]'
t = t.replace(old, new)
p.write_text(t)
print("Done")